-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Change filePath to real path if it's an upload #4132
Change filePath to real path if it's an upload #4132
Conversation
This breaks existing implementations. I had to revert to 3.1.55. With 3.1.56 the uploaded file would not be found at all. |
Hmm...that's odd. The behavior before for |
@isaacdew2 we are also experiencing issue with your changes when specifying a 'disk' it's now using the absolute path to read from the storage. Please see my PR to see if that works for you too. |
This also breaks our use case, importing to S3 via disk. @patrickbrouwers maybe the best course would be to revert this change. Then @isaacdew2 can stay on the current tag while the new tag returns a working state for existing users. In the meanwhile a new PR can be created and tested to get it working for everyone. Especially since reverting to 3.1.55 means also downgrading to before the security patch of 3.1.57 |
@SanderMuller can you check if #4200 fixes your use case too? |
@patrickbrouwers it fixes it, yes. But I'm not sure if it still works for @isaacdew2 given his #4200 (comment) |
I tend to agree with @SanderMuller. Apologies for all of the headaches! I can create a PR to revert my change if that'd be helpful. |
Let's do that and then work in the new PR on a fix for all solutions |
…)" This reverts commit dedf198.
Please take note of our contributing guidelines: https://docs.laravel-excel.com/3.1/getting-started/contributing.html
Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
1️⃣ Why should it be added? What are the benefits of this change?
The current state breaks cases where the
UploadedFile
is not on a local disk such as S3. I discovered this issue in a project when using S3 for Livewire temporary files. Currently, one must do$myImport->import($uploadedFile->getRealPath())
instead of$myImport->import($uploadedFile)
when using S3 for temporary files.2️⃣ Does it contain multiple, unrelated changes? Please separate the PRs out.
No.
3️⃣ Does it include tests, if possible?
No. I'm not sure how to add tests for this without a remote disk connection. If there's a way let me know!
4️⃣ Any drawbacks? Possible breaking changes?
There shouldn't be. It's a small change and for local
UploadFile
instances it should work exactly as it did before.5️⃣ Mark the following tasks as done:
6️⃣ Thanks for contributing! 🙌
Thank you for building an awesome package!