The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

Input File-Type: ACCEPT Parameter Filtering on File Dialog Select

Forums » Opera for Windows/Mac/Linux » Desktop wish-list

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

12. November 2011, 03:14:13

WillYum

Wisking Water Splashes

Posts: 2044

Input File-Type: ACCEPT Parameter Filtering on File Dialog Select

I like that Opera does filter file-types based on the ACCEPT parameter of FILE type of INPUT elements but the filtering is based on the first listed MIME-type, instead of all listed MIME-types (incidentally, the manner which Chrome has implemented their file dialog).

I'd really love if Opera initially filtered not based on the first listed ACCEPT MIME-type but on all listed MIME-types and then perhaps in their drop-down display filter box listed all of the MIME-values that are accepted (along with the 'safety' option of 'All files').

The outcome being that Opera's File-Select Dialog Box would display filter based on all-accepted types. So if did:

<input type="file" accept="image/gif,image/png,image/bmp,image/jpg">


It would display all of my listed image types (I suspect I could just use accept="image" so let me give another case).

<input type="file" accept="application/pdf,application/zip,text/plain,application/msword,	
application/vnd.openxmlformats-officedocument.wordprocessingml.document">


Which would allow PDFs, ZIP files, Plain text files, MS Word ".doc" files and MS Word ".docx" files.

Yum
P.S. Note this is a usability request, not a replacement for Server Side checks of file-types or Javascript validiation. I'd just rather help the user by displaying the relevant files, rather than their whole directory content (at least to the browsers cool enough to implement the ACCEPT attribute) smile

12. November 2011, 04:22:38

burnout426

Posts: 13202

With:
<input type="file" accept="type1, type2, type3">

, I get 4 choices in the drop-down in the open file dialog.

type1
type2
type3
All Files

Are you saying that you want it to be:

All Accepted
type1
type2
type3
All Files

?

12. November 2011, 05:16:31

WillYum

Wisking Water Splashes

Posts: 2044

Yes, essentially.

12. November 2011, 14:20:44

Frenzie

Posts: 15571

+1
The DnD Sanctuary — a safety net for My Opera's demise.

12. November 2011, 15:19:50

serious

Now also on Vivaldi

Posts: 5658

+1, all major programs I know have that option.
All my posts only represent my own opinions.
[ Tweedo Monitor - Deluxe Website & Service Monitoring ]

6. April 2012, 13:53:42

DoTheEvo

Posts: 69

+1
especially when opera cant handle mp3, I thought I'd filter for wav and ogg, but no, I have to use audio/*

23. July 2012, 23:33:01

archetwist

Wind is in my hair, lead is in my pencil!

Posts: 2313

+1

And jeez, it's sooo annoying when you post a lot of photos to Tumblr and you have to choose "image/jpeg" instead of "image/gif" every time.

Forums » Opera for Windows/Mac/Linux » Desktop wish-list