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

Change filePath to real path if it's an upload #4132

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

isaacdew2
Copy link
Contributor

@isaacdew2 isaacdew2 commented May 15, 2024

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:

  • Checked the codebase to ensure that your feature doesn't already exist.
  • Take note of the contributing guidelines.
  • Checked the pull requests to ensure that another person hasn't already submitted a fix.
  • Added tests to ensure against regression.

6️⃣ Thanks for contributing! 🙌
Thank you for building an awesome package!

@patrickbrouwers patrickbrouwers merged commit dedf198 into SpartnerNL:3.1 Jun 3, 2024
18 checks passed
@patrickbrouwers patrickbrouwers mentioned this pull request Jun 3, 2024
1 task
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.

None yet

2 participants