compare pdf size in readable

Asked

Viewed 83 times

-2

Next I have an application in Arabic that I put a pdf in a register, but when the pdf is too big it of the error, would have as I know up to which PDF size I can use and if the guy put a pdf greater than the limit I show an error message?

1 answer

0


To know the file size using Laravel from version 5.7 you can use the method getSize(). In previous versions, the method is getClientSize(). See below for an example:

Laravel < 5.7

$request->file('file')->getClientSize();

Orange >= 5.7

$request->file('file')->getSize();

Behold this documentation for more details.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.