Forum

Thread tagged as: Question, Problem

Uploading PDF type files on localhost not working

Hi, I'm trying to create a clickable image that opens a pdf document in a new tab but I continue to encounter two problems. The first is when a user clicks "Select or upload a fie" and goes to upload a PDF type file nothing uploads. Secondly when I tried doing this a different way by getting the user to paste the url of the pdf the "target='_blank'" section of the attribute would always be deleted. The code I am trying to use to get a pdf to upload is as follows;

<a target="_blank" href="<perch:content id="file" type="file" label="File" order="2" />">
            <img id="pdf_link" class="z-depth-5 " style="width:60%; " src="<perch:content type="image" id="image" label="Image" />" 
                 alt="<perch:content type="text" id="alt" label="Description" required="true" help="List of books" title="true" />">
        </a>
Derek White

Derek White 1 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

How big is the PDF? Can you post your diagnostics report?

The PDF is 2,646KB in size. Just checked diagnostics and the problem seems to be a limit on files 2MB or larger. Thanks for directing me to this. How do you change this limit?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's a PHP configuration, rather than something controlled by Perch.

Ok thanks I'll look into it.