Hi
Can anyone explain about “Improved: File type checking with ContentType()” in v2020.0.15? How to implement this? As far as i know…when upload file, only mime type is checking not content type… I.e. when we change ext file from doc to image like jpg… The file will allow to upload because only jpg file can upload… In my opinion if thats content type the file cant be uploaded even ext has been changed to jpg.
Thanks
From the source code of the ContentType() function in phpfn.php, mp3/mp4 file types are now detected for blob data, and it will check the file extension of the zip files (Office files are also zip files). I don’t think PHPMaker checks the binary content of upload files, if users rename the file they can upload, but they cannot rename the file extension back either, the uploaded file will be useless. If you want to check uploaded file content, you may use Row_Inserting/Updating server event.
Oo… I see… Thank you so much.