Status/Resolution/Reason: To Fix//EnhancementRequired
Reporter/Name(from Bugbase): Priyank Shrivastava / Priyank Shrivastava ()
Created: 08/17/2017
Components: File Management, CFFile
Versions: 2016
Failure Type: Others
Found In Build/Fixed In Build: /
Priority/Frequency: Minor /
Locale/System: / Win 2012 Server x64
Vote Count: 1
Currently if you want to upload a file in script syntax and check errors you have to try-catch the fileUpload() method.
This causes a few problems, including but not limited to the following two:
1. If the user uploads a file of a MIME type that you're not accepting, you have to either trust that ClientFileExt is legit (which cannot be trusted in malicious cases or, as we have found, even the case of jpegs and pngs) or report back the MIME type they have used. This is bad UX and it would be better to report back that their file extension shows as 'x' but is in fact a 'y' file
2. If you want to report an error on an empty file, the best we can find so far is to test if the error.message value contains "no data was received"
All in all, having the server-side file information as well as the error information without having to catch and make educated guesses would be ideal
Attachments:
Comments: