• Post Reply Bookmark Topic Watch Topic
  • New Topic

File Upload Filetypes  RSS feed

 
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,
 
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,
 
Ranch Hand
Posts: 1489
  • 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.
 
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter
https://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!