Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5.0 Get uploaded file path

Tags:

php

laravel

I'm uploading a file through a form.

When I dump the file with $request->file("slide") it returns an UploadedFile object but it haven't a method to get the path to the temporal file.

How can I get it?

I need the path to modify the image with Intervention Image before saving it to disk.

like image 535
Alan Avatar asked Oct 21 '25 14:10

Alan


1 Answers

You should try

$request->file('slide')->getPathName();
like image 181
Artur Subotkevič Avatar answered Oct 23 '25 04:10

Artur Subotkevič



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!