GhostCode
GhostCode

Reputation: 578

PDF files not fully loading on nginx server

I currently have a web application that generates fairly large PDF files (100 - 200 MB per file). The application is currently configured to display the PDF in a new window. When the PDF file size is low (50mb or so), I can successfully use "save as" in Chrome and Firefox to download the file. But, if the file size is larger than that, I'm able to see the output of the PDF in the browser, but unable to use "save as" (nothing happens).

The server is running on nginx / PHP-FPM. I've tried upping the memory limit for the script, disabling the script execution time and a few other random tweaks to try and diagnose the issue, but I'm unable to make any progress. My logs aren't showing anything of use (at least, not that I can tell).

I suspect this issue is due to the PDFs not fully downloading during the script execution, but the data all seems to be there...

Any advice on how I can get the file downloads working for larger PDF data?

Upvotes: 0

Views: 1428

Answers (1)

sam156
sam156

Reputation: 11

The configuration of the server limits the size of your data,you have to change configuration---upload_max_filesize which is in directory---client_max_body_size.

Upvotes: 1

Related Questions