• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

File Upload Filetypes

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic