Forum

Thread tagged as: Question, Problem, Error

File Type Accept PDF fails

Hi,

I've got a form that requires the upload of a PDF that works on both a Local and Staging server, but not on the Live server.

<perch:input type="file" id="cv" accept="pdf"  required="true" />

The problem with the Live Server is that when uploading a PDF it returns the file type error (but Only on the Live server, not Local or Staging).

        <perch:error for="cv" type="filetype">
          <p class="error">File must be a PDF document.</p>
        </perch:error>   

The code is exactly the same across servers, the default filetypes.ini is included i.e.

Any ideas on what to look for or change on the Live Server settings? Thanks!

James Hazelton

James Hazelton 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does your server have the file info extension installed?

No it was not enabled, now it works.

Thank you Drew!

Drew McLellan

Drew McLellan 2638 points
Perch Support

It doesn't look like it, so that would be the first thing to try. It's how PHP can detect file types.

Edited last post and enabled to fix, thanks again.