Issue #8 open
Anonymous created an issue

You should at the very least mention the existence of app.upload_set_config. Furthermore let me quote from the documentation:

UPLOADED_FILES_ALLOW This lets you allow file extensions not allowed by the upload set in the code.

so this overwrites or creates fallback default or what?

Question you should also be answering: How do i write the configuration of an UploadSet to the app? how do I set the allowed extensions for an UploadSet? How can i tell which UploadSets are configured if all i have is current_app. (i.e. from a blueprint in a separate file)

Also let me blow off some steam: This is the worst documented library I have encountered in my entire life. Please, if you want people to use it, fix this first before any further features or bug fixes. At the moment it would be better to just remove it and so force people the code, which is a thousand times more informative than the text.

Comments (3)

  1. Ron DuPlain

    "This is the worst documented library I have encountered in my entire life."

    This kind of hyperbole makes it difficult to take your feedback seriously. I'll take a look at the documentation and see what I can do. I'll also review pull requests and forks.


  2. Matthew Frazier repo owner
    • changed status to open

    First off, I have to agree with Ron about the hyperbole. That being said, I took a look through the manual, and I don't really see anything wrong with the API documentation itself, but I do see how the way I arranged and presented it can be confusing.

    My intent with arranging the documentation in the way that I did was so that if an application (like, say, MoinMoin) used Flask-Uploads, they could point their users to the "Configuration" section to explain how to properly stash their uploads. It appears that I instead confused you into believing that that was how the application author defined the upload set's behavior.

    However, sometime soon (hopefully this week), I will expand on the introduction section with some of the general concepts Flask-Uploads is based on. Major points include:

    • Applications define one or more "upload sets," which have names like `photos`, `music`, and `attachments`. Besides the name, the application's author defines a set of extensions that the upload set will allow by default.
    • In the application's configuration file, the administrator defines the locations on the filesystem where uploads to each set are stored. If the administrator has a Web server like Apache or Nginx serving the uploaded files, he/she can also inform Flask-Uploads of that server's public URL.
    • The administrator can also use the `UPLOADED_X_ALLOW` and `UPLOADED_X_DENY` configuration settings to override decisions made by the application's author about what extensions to include.

    Hopefully this should be sufficient to clarify most of your questions. If you have anything else you would like clarified or elaborated on, please let me know (ideally in a more polite manner).

    Thanks, Matthew

  3. Log in to comment