Exceptions#

class quart_uploads.UploadNotAllowed#

This exception is raised if the upload was not allowed. You should catch it in your view code and display an appropriate message to the user.

class quart_uploads.AllExcept(items: Any)#

This can be used to allow all file types except certain ones. For example, to ban .exe and .iso files, pass:

AllExcept(('exe', 'iso'))

to the UploadSet constructor as extensions. You can use any container, for example:

AllExcept(SCRIPTS + EXECUTABLES)