In this section, we are going to describe the procedure that is performed on the documents before they are finally uploaded to Athento.
This procedure is fulfilled as long as the created document has an associated binary, otherwise, these checks are ignored.
- Step 1: Check that the extension of the document is allowed by the space, these extensions can be configured by the user. How to control the extensions of the files that are uploaded to a space?
- Step 2: Check that the mime-type of the file is in the list of allowed mime-types, this list is in
settings_ase.py
under theALLOWED_MIMETYPES
variable.
ALLOWED_MIMETYPES = (
'image/png',
'image/jpeg',
'image/tiff',
'text/plain',
'text/csv',
'text/rtf',
'text/html',
'application/pdf',
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.ms-excel',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/vnd.ms-powerpoint',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/zip',
'application/octet-stream',
)
This list contains the most common mime-types, but it can grow and be modified at the server level under the customer's request.
If both conditions are not met, an error will be thrown which will be specifically picked up by the different components by which the documents are created or loaded and they will take care of acting accordingly.
For example, in the dashboard loading panel, if we get an error, a message like this will appear:
Comments
0 comments
Please sign in to leave a comment.