Tech Support banner

Status
Not open for further replies.
1 - 3 of 3 Posts

·
Registered
Joined
·
38 Posts
Discussion Starter · #1 ·
We have this upload functionality in our application that allows only pdf,xls and txt files to be uploaded.
How can i know whether a user has renamed an exe file to txt(or pdf or xls)file and tried to upload it?
Currently,if a user performs any such trick,app throws error as 'Invalid file type',but the user shows us the file(with renamed ext) and claims it to be of proper ext.
Any inputs??
 

·
TSF Team, Emeritus
Joined
·
2,619 Posts
One way would be to check the version tab of the file's properties. txt, pdf, and xls files will not have this tab while most exe files will. It will usually identify the original filename.

If you want to do this or something similar in the application you should ask in the programming forum.
 

·
Registered
Joined
·
38 Posts
Discussion Starter · #3 ·
One way would be to check the version tab of the file's properties. txt, pdf, and xls files will not have this tab while most exe files will. It will usually identify the original filename.

If you want to do this or something similar in the application you should ask in the programming forum.
Thanks for your reply.
Its not about only exe files,there are other file types also(like odt,ods,bak,etc..)???
EG:If user tries to upload a log file(after renaming it pdf),then what?
 
1 - 3 of 3 Posts
Status
Not open for further replies.
Top