Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double root issue #563

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open

Conversation

rojtjo
Copy link

@rojtjo rojtjo commented Dec 12, 2024

I have a filesystem (S3) configured with a custom root set to public which means any file I put or get from that filesystem will get prefixed with public/. In the Uploader class it attempts to read the contents of my upload by using the Storage facade and by getting the path by using $file->path() but this actually returns the prefixed path.

So $file->path() returns public/livewire-tmp/foo.png which means when I attempt to read that file from my filesystem it actually looks for the file public/public/livewire-tmp/foo.png in my S3 bucket resulting in an error.

Livewire actually provides a get() method on the TemporaryUploadedFile class which solves this exact issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant