Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Holly Fox   on Apr 23 In Asp.net Category.

  
Question Answered By: Adanalie Garcia   on Apr 23

im making file upload  user control.
one of the control properties is the allowed formats:
myUpload.allowedFormats = "gif|jpg|doc|txt|ppt|xls|htm|html";

now,i took the file  name and split the name and compare this string (split it
also) to the file extension.

it is not a good approch since a person can rename the file name to something
like:

myFile.jpg.exe

...

so what is the solution?if im taking myFile.postedFile.contentType

im getting in word application upload : application\msword...

i need the extension to compare to what the developer put in the property
(doc,htm...)

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on upload file Or get search suggestion and latest updates.


Tagged: