aspose file tools*
The moose likes Servlets and the fly likes File Upload Filetypes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "File Upload Filetypes" Watch "File Upload Filetypes" New topic
Author

File Upload Filetypes

ford Darcy Jr
Ranch Hand

Joined: Jan 26, 2005
Posts: 76
Hi,

I am using Multipart request to upload files. My upload program is working fine. But, is there anyway to restrict the specific filetypes while uploading. I mean if a particular filetype is encountered, the file should not get uploaded.

Thanks,
DC Dalton
Ranch Hand

Joined: May 28, 2001
Posts: 287
I think you can do that on your front end (even though not a flawless idea).I have to look around but I remember something about an accept attribute in your form tag.. Ill have to look around though
ford Darcy Jr
Ranch Hand

Joined: Jan 26, 2005
Posts: 76
Thanks a lot, I will try using Accept tag.

Thanks,
ford Darcy Jr
Ranch Hand

Joined: Jan 26, 2005
Posts: 76
Hi,

Accept attribute, doesnt seem to be working on IE 6.0. Is there any other way to restrict the file types.

Thanks,
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1373
Which File Upload you are using ? I tried Jakarta commons File Upload, i am also facing the same problem.
ford Darcy Jr
Ranch Hand

Joined: Jan 26, 2005
Posts: 76
Originally posted by kri shan:
Which File Upload you are using ? I tried Jakarta commons File Upload, i am also facing the same problem.


Hi,

I am using Multipart request file upload. I wrote a javascript function to restrict the file types and it works fine now.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Upload Filetypes