QuickTicket

Annexe 4: Document upload

This annexe explains how to control the upload of documents.

Allowing document upload?

In the security section of the administration panel, you can configure who can upload documents and the maximum document size allowed. This annexe goes further by describing how the document types are controlled.

When attaching documents in a message, the application will control the type document using two techniques: the file extension and the mimetype. The extensions and mimetypes allowed are listed in the file /bin/qti_upload.php.

Unless the list of allowed extensions is empty, the application will control first that the extension of the uploaded document is in the list. Only if the extension is allowed, the application will perform a second control to check if the mimetype of the document is in the list of allowed mimetypes.

When the list of allowed extensions is empty, the application will control only the mimetypes.

About mimetypes

If you want to rely on the mimetypes only, just define an empty extension list, and fill-in the mimetype list.

Pay attention on the fact that it is possible that the browser of the user will not provide standard mimetype names (or even don't provide mimetype) when uploading the document. (That's why the initial settings of QuickTicket use the file extensions to control the document upload and not the mimetype.)

Previous | Next