File Upload

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
asahli
Forum Newbie
Posts: 1
Joined: Fri Jul 17, 2009 6:11 am

File Upload

Post 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
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: File Upload

Post 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.
katangaj
Forum Newbie
Posts: 1
Joined: Mon Jul 20, 2009 7:03 am

Re: File Upload

Post by katangaj »

Are you sure this feature is not supported by most browsers?
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: File Upload

Post by kaszu »

It's not supported by FF, so I assume chart is correct. If you know something we might not know, please share.
caltoche
Forum Newbie
Posts: 6
Joined: Mon Jul 27, 2009 8:46 am

Re: File Upload

Post by caltoche »

To my min, it's impossible because the choose file window is displayed by your operating system, not the browser.
User avatar
Sindarin
Forum Regular
Posts: 521
Joined: Tue Sep 25, 2007 8:36 am
Location: Greece

Re: File Upload

Post 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.
Post Reply