develop12's avatar

The “” file does not exist or is not readable

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 my available space on the server and 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

but I keep getting the same error, I would like to know if I have to make any other modifications at the project level.

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

I would greatly appreciate the support.

0 likes
7 replies
MohamedTammam's avatar

When changing PHP config you need to restart the process.

When it doesn't happen with images, do the images have size more than 10M?

1 like
develop12's avatar

@MohamedTammam

When changing PHP config you need to restart the process.

  • How is the reset process performed? you mean restart apache (if so, it was already restarted)

When it doesn't happen with images, are the images larger than 10M?

  • Yes, some have weighed more than 10M
develop12's avatar

@MohamedTammam I'm confused because it doesn't even enter the code, it tries to map the whole traversal and it doesn't even enter the controller, only validations and no validation deals with the size of the file.

develop12's avatar

@MohamedTammam The validation that returns is:

The documents failed to upload

The code used is:

$path = $data['document']->store('documents');
$name = $data['document']->getClientOriginalName();
$document = $this->model->create([
      'title' => $data['title'],
      'pdf_path' => $path,
      'pdf_name' => $name,
      'slug' => Str::slug($data['title'], '-')
]);
 return $document;

but as commented above, it doesn't even enter the controller

Please or to participate in this conversation.