Hi @bgweb
Is $this->photo an instance of Illuminate\Http\UploadedFile?
Try:
dd(get_class($this->photo));
In other words, is $this->photo = $request->file('photo')?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
According to the docs, calling store() on a file upload should return the path of the file: https://laravel.com/docs/7.x/filesystem#file-uploads
Here is my very basic example:
$photoPath = $this->photo->store('photos');
dd($photoPath);
In this case, $photoPath is returning true.
What am I doing wrong here? Is anyone else experiencing the same issue?
So, to sum up, I think the best bets would be to:
Override the default behaviour with a callback
Extend the TemporaryUploadedFile class and override the storeAs() method (once again!) in order to use put() or putFileAs() instead of copy(). You could even add a pull request with the changes to the original repository (the author seems to be very active): https://github.com/livewire/livewire/pulls
The alternative would be to find a hacky way to return the file path (instead of the result of the copy operation itself).
Please or to participate in this conversation.