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

Merged
merged 1 commit into from
Dec 28, 2024
Merged

Fix double root issue #563

merged 1 commit into from
Dec 28, 2024

Conversation

rojtjo
Copy link
Contributor

@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.

@awcodes awcodes merged commit 22542cf into awcodes:3.x Dec 28, 2024
4 checks passed
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.

2 participants