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

[2.x] Inertia - clear user profile photo input #781

Merged
merged 2 commits into from
May 10, 2021

Conversation

gjinali
Copy link
Contributor

@gjinali gjinali commented May 10, 2021

Description:

On inertia js stack, if jetstream profile photos feature is enabled then user selects a new photo and hits the save button several times without refreshing the page, the photo file input does not get cleared and inertia form would send the same file for each profile update post request via inertia post, also server would handle the file upload each time.

Steps to reproduce:

Case 1

  • Enable profile photos feature
  • Visit the user profile page
  • Select a new photo
  • Click on the save button and do not refresh or navigate
  • Save++
  • Check form payload or users table profile_photo_path attribute or storage folder

Case 2

  • Visit user profile page
  • Select a new photo
  • Click save and do not refresh or navigate
  • Click remove photo button and click save, the removed photo will reappear again.

UpdateProfileInformationForm.vue:
- clear photo file input value
@taylorotwell taylorotwell merged commit 181273c into laravel:2.x May 10, 2021
@gjinali gjinali deleted the inertia-clear-photo-file-input branch May 10, 2021 13:49
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