Error upload pdf files

I run into the following problem:

When trying to upload pdf files less than 10M it shows me the following error

The “” file does not exist or is not readable.

I gave myself the task of checking the space in my droplet but I still have more than 60% available, then check my variables post_max_size = 8M upload_max_filesize = 2M and change them to post_max_size = 64M upload_max_filesize = 64M, restart apache to apply the changes, but I still get the same error, I would like to know if I have to make any other modifications at the project level (laravel).

It is important to mention that this only happens with pdf files, when loading images everything works perfectly.

I would greatly appreciate the support.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Site Moderator
Site Moderator badge
February 12, 2023

Hey @brenmor,

It’s possible the changes you’ve done are not on the actual php.ini file that is being used. What you can do is create an info file - info.php with the following content:

  1. <?php
  2. phpinfo();

Once you’ve created it, you’ll just need to load it. In there you’ll see the loaded configurations line. That’s the php.ini you’ll need to update.

Additionally, remember to add the info.php file in your public folder from where Laravel is loaded to be able to reach it.

Hope this helps!

Hi there,

Do you see any errors in your Laravel logs?

Also, do you have any validation rules in your upload controller that might be preventing you from uploading PDF files?

Feel free to share the upload method here so I could take a further look!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up