Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File Upload Filetypes

 
ford Darcy Jr
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot, I will try using Accept tag.

Thanks,
 
ford Darcy Jr
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1460
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which File Upload you are using ? I tried Jakarta commons File Upload, i am also facing the same problem.
 
ford Darcy Jr
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic