Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830
this week in the
Programmer Certification
forum!
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
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
paul wheaton
Sheriffs:
Ron McLeod
Devaka Cooray
Henry Wong
Saloon Keepers:
Tim Holloway
Stephan van Hulst
Carey Brown
Tim Moores
Mikalai Zaikin
Bartenders:
Frits Walraven
Forum:
HTML Pages with CSS and JavaScript
File upload
Nit Kul
Greenhorn
Posts: 14
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
In
JSP
<input type="file/> gives an option to choose local file using the file chooser menu.
How can I restrict this menu, to allow users to upload just JPG files?
Thanks
Bear Bibeault
Sheriff
Posts: 67752
173
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Not a JSP question. Moved to the HTML forum.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Bear Bibeault
Sheriff
Posts: 67752
173
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You can't. You'll have to check it on the server after the upload.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Nit Kul
Greenhorn
Posts: 14
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Thanks for reply,
<input TYPE="file" name="filename" accept="image/jpg"/>
I used accept option, after reading it in some of other forums. But this did not work.
Is there anyway I could make accept work?
Thanks again
David Newton
Author
Posts: 12617
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The answer is still no--most (all?) browsers ignore the attribute.
I am going down to the lab. Do NOT let anyone in. Not even this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to write the code to upload images?
Opening File Chooser in a jsp Page?
sending a file to servlet
Encoding problem with File Upload
calling getInputStream after getParameter
More...