Document upload file type restriction
This is used for restricting the type of files that can be uploaded from upload documents present on many different screens.
To Add or Remove any file type that can be uploaded in document section
- Open pos/config/constants.php file for editing using cpanel editor or filezilla
- In this file, search for document_upload_mimes_types variable, this contains the array of files that can be uploaded.
- To add any new file type, search the MIME type from here, we need the MIME Type column and extension column
- Example:
MIME type = audio/mpeg
Extension = mp3
Add it as ‘audio/mpeg’ => ‘mp3’, - Follow the php array convention to not make any mistake in the array