Atozed Forums
Possible to use TIWFileUploader.CheckMimeType() in a non-IntraWeb application? - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Possible to use TIWFileUploader.CheckMimeType() in a non-IntraWeb application? (/thread-2554.html)



Possible to use TIWFileUploader.CheckMimeType() in a non-IntraWeb application? - magosk - 11-12-2021

Hi,

as a security measure we are using TIWFileUploader.CheckMimeType() in one of our web applications for checking files uploaded for data import. Now I am making the data import available in another non-IntraWeb application (an API server). Even if this is not a web application, is there any way to include the relevant IW unit(s)/component(s) and perform the same check? Note: I see that the above is a class method, but does not take a file name parameter; instead it seems to get it's data from the web application somehow. We are currently using IW 15.1.15 in production.

Best regards

Magnus Oskarsson


RE: Possible to use TIWFileUploader.CheckMimeType() in a non-IntraWeb application? - Alexandre Machado - 11-12-2021

Hi Magnus,

the way it is designed today won't allow you to use it outside the scope of an IntraWeb application. The best I can do is refactor it in a future release (when we break the binary compatibility at DCU level) to allow your code to call it passing a file name.


RE: Possible to use TIWFileUploader.CheckMimeType() in a non-IntraWeb application? - magosk - 11-15-2021

(11-12-2021, 07:34 PM)Alexandre Machado Wrote: Hi Magnus,

the way it is designed today won't allow you to use it outside the scope of an IntraWeb application. The best I can do is refactor it in a future release (when we break the binary compatibility at DCU level) to allow your code to call it passing a file name.

Thanks Alexandre, that would be nice!