This is a great module. Thanks for the effort put in here.

HTML5 has an attributes called accept, which lets browser limit the file types allowed. This is super useful to prevent the users from upload file types that will be rejected by server-side validation.

I'm attaching a patch that uses the file field's allowed file types and convert it to the format expected by the accept attribute. I also tested it across multiple browsers and they worked well (Firefox, Chrome and Internet Explore 10).

Comments

ayesh’s picture

StatusFileSize
new1.05 KB
spadxiii’s picture

Status: Active » Reviewed & tested by the community

Just applied this patch on 1.13 and it works fine! Setting this to RTBC

idebr’s picture

Version: 7.x-1.13 » 7.x-1.x-dev
StatusFileSize
new620 bytes
new1.38 KB

Reroll to fix trailing whitespace. Patch works as expected, so RTBC++

  • VladimirAus committed dcfb2afa on 7.x-1.x authored by idebr
    Issue #2510316 by idebr, Ayesh, SpadXIII, VladimirAus: Support HTML5 '...
vladimiraus’s picture

Status: Reviewed & tested by the community » Fixed

Thanks everyone! Committed and deployed! 🍻

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.