Thread tagged as: Question, Forms

File Upload - Form


I am adding a very simple upload button to my contact form in order to except jpeg and png images.

Do I need to add them to my accept="png jpeg" html ?

I have my /config/filetypes, do I need to add both jpeg and png there as well? if so how? Or is this already done and I do not need to change or add to it?

Time appreciated

Gary Thompson

Gary Thompson 0 points

  • 3 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

The documentation is here:

"type="file": this will create a file upload field which accepts document formats using the accept attribute. The allowed formats are detailed in: perch/config/filetypes.ini"

Cool, so I have found in perch/config/filetypes.ini": image/gif image/jpeg image/jpg image/png image/

How do I correctly add the html markup accept="png jpeg" or accept="image/png image/jpeg"

Could it be a hosting issue my end?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Are you experiencing a problem? If so you haven't told us what.

We would also need to see your template and Diagnostics Report.