Specify mime type in upload file widget or Camera Plugin in Mobile App

Specify mime type in upload file widget or Camera Plugin in Mobile App

  

Hi ,

When user upload file from mobile, I want to restrict user to upload Docx, PDF ,JPEG file only.

In upload widget , when i set accept "Any"  user can upload all file. Even i try to assign accept as extended property, accept="image/jpeg,application/pdf" , it wont work.

In camera plugin , when i set media type "ALL MEDIA".It allow user to select all type of file.

I don't want to validate file type after user select file, My requirement is user won't able to see other type of files during upload.

How to restrict user to select only DOC,PDF,JPEG file from mobile Storage?

Also i have to check size of file within plugin.

Thanks,


I haven't tried this yet, but it must work as it's html5. Try to use the accept tag as an extended property. Here is how to use it:

https://stackoverflow.com/questions/7575482/restrict-file-upload-selection-to-specific-types

Hi joa ,

I already tried with "accept" as extended property as i mentioned it in my post before.It not work with "ANY" "Accept" as upload property for mobile .


Hi Rocky. Sorry, I for not noticing the detail in your previous description.

Well, I just created a demo mobile app, and it worked fine for me. Take a look at the attachment and tell me if it helps.

Hi Joa,

I tried your oml. In documents option  it allow me to select all types(docx,html,jpeg etc) of files , i dont want user to see other type of file only specific file will be visible. I am using android phone.