panthro's avatar

Getting information from a file?

I upload a file like this:

Storage::putFileAs(config('media.path'), $file, "{$name}.{$extension}");

$file can either be a URL (string) or a UploadedFile.

I now need to get some information about the file - width, height, mime, extension, file size.

There seems to be loads of different ways, use Intervention to make an image from the file, use the File facade etc.

Which way is considered best/most efficient?

0 likes
0 replies

Please or to participate in this conversation.