Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IW15 FileUplader and GetUploadedFileMimeType
#13
Hi again. I just downloaded 15.1.11 and tested TIWFileUploader.CheckMimeType() and now it works without errors, thanks!

The only thing I noticed in my tests is that the method in some cases seems to take the file extension into account rather than just the file contents (which is not ideal since the function typically can be used as an extra layer of protection against attempts to upload malicious files). For example, a genuine xlsx file is recognized as application/vnd.openxmlformats-officedocument.spreadsheetml.sheet. If I rename a .pdf file to .xlsx it is correctly identified as application/pdf anyway. But if I rename a .docx file to .xlsx the function reports it as a spreadsheet even though it isn't. And if I allow .docx files in my file filter and rename a .xlsx file to .docx it will similarly return application/vnd.openxmlformats-officedocument.wordprocessingml.document even though it isn't.
Reply


Messages In This Thread
RE: IW15 FileUplader and GetUploadedFileMimeType - by magosk - 01-15-2020, 02:31 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)