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: time() being appended regardless of pre-existing file with same filename #330

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

nxgcx
Copy link
Contributor

@nxgcx nxgcx commented Oct 24, 2023

Problem

It seems that regardless of a file existing or not, time() is appended to the filename, which it appears should only occur when the file does in fact exist.

Solution

  • Copy over the way this conditional was handled in v2
  • Convert $filename to a string for cases where it is equal to the return of Str::uuid(), to avoid Livewire throwing an exception about an invalid component property type if it does not have time() concatenated to it (effectively converting it to a string).

Testing

  • Tested both local and S3 storage disk types with adding duplicates, with should_preserve_filenames = true
  • Tested both local and S3 storage disk types with adding duplicates, with should_preserve_filenames = false

@nxgcx nxgcx marked this pull request as ready for review October 24, 2023 17:29
@awcodes awcodes merged commit ce1da3b into awcodes:3.x Oct 25, 2023
1 check passed
@awcodes
Copy link
Owner

awcodes commented Oct 25, 2023

Thanks.

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