PDA

View Full Version : Uploading JPG



A7RSTR7K3
April 2nd, 2005, 11:01 AM
Hello... I currently have a page which allows you to upload a jpg... And in the html form, I use the <input type="file"> When they click this the browser window comes up and they can select a file... Is there anyway to have the browser window pop up but have it only show jpgs? Understand what I mean?

petefs
April 2nd, 2005, 03:07 PM
No : )

Your only option there is using something like an ActiveX object and then you're limiting yourself to windows IE browsers. There may be a firefox plugin that allows similar functionality, but still... don't bother ^_^

G
April 4th, 2005, 12:32 PM
Never heard of this kind of hack for that html form element, however this is a possibility if you create your own in Java for example - google it.

mpelland
April 4th, 2005, 12:35 PM
yeah I have had that problem before as well. i suggest just using the default (where you can see every file type) and, in your script, just make sure that you check the extensions and give the user feedback on errors.