Page 1 of 1

File Upload

Posted: Fri Jul 17, 2009 6:13 am
by asahli
Dear Colleagues,

I am using file upload components to upload pdf files... Is there anyway to make the choose file windows display only PDF files?

Your kind advice please,
Thanks

Re: File Upload

Posted: Fri Jul 17, 2009 11:55 am
by kaszu
If you are using <input type="file" /> then no. There is attribute 'accept' but unfortunately it's not supported by most browser.
If you are using flash uploader, then most likely you can, but for that you need to check its documentation.

Re: File Upload

Posted: Mon Jul 20, 2009 7:46 am
by katangaj
Are you sure this feature is not supported by most browsers?

Re: File Upload

Posted: Mon Jul 20, 2009 11:30 am
by kaszu
It's not supported by FF, so I assume chart is correct. If you know something we might not know, please share.

Re: File Upload

Posted: Tue Jul 28, 2009 9:44 am
by caltoche
To my min, it's impossible because the choose file window is displayed by your operating system, not the browser.

Re: File Upload

Posted: Thu Jul 30, 2009 9:15 am
by Sindarin
accept is not supported as it has been said. Only Opera supports accept partially.
You better use javascript and server-side code to check the file extension/mime-type, more secure that way too.