• Chuckie

    (@ajtruckle)


    On my form I filter for PDF files. I was finding that Edge was not showing the filter.

    I inspected the code and saw it written like this:

    <input name="file-S89-Template" size="40" class="wpcf7-form-control wpcf7-file" id="S89" accept=".pdf" aria-invalid="false" type="file">

    I see that accept has a value of .pdf. I have been looking at this answer on StackOverflow it mentions:

    <input name="file1" type="file" accept="application/pdf" />

    I also looked here and it mentions:

    
    Accept: <MIME_type>/<MIME_subtype>
    Accept: <MIME_type>/*
    Accept: */*
    
    // Multiple types, weighted with the quality value syntax:
    Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8

    Can I please kindly ask you to investigate how you are applying the accept filter values as I can’t get PDF to be selected in Edge at the moment.

    Thank you
    Can I kindly ask you to

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter Chuckie

    (@ajtruckle)

    Actually, they suggest it should be:

    accept=".pdf,application/pdf"

    They say that would have wider browser support, but that Edge doesn’t obey the accept attribute anyway. So I leave it up to you if you want to improve.

    A related question though. Is there any subsequent test we can do to verify that the attachment is at least named a pdf?

Viewing 1 replies (of 1 total)

The topic ‘Filter for PDF’ is closed to new replies.