laravel / ideas

Issues board used for Laravel internals discussions.
938 stars 28 forks source link

[Proposal] Handling uploaded files when validation fails #1377

Open pedrofurtado opened 5 years ago

pedrofurtado commented 5 years ago

Currently, when a user fills a form with a uploaded file, submit it and the validation fails, the uploaded file get lost and the user needs to re-upload again. Much libraries handles this kind of stuff out of box, like Carrierwave in Ruby on Rails ( https://github.com/carrierwaveuploader/carrierwave ), maintaining the file while validation fails in forms, without needing of users to re-upload them.

If Laravel could make this file uploading handling, it would be cool. This is a very common scenario in many applications 👍

goszowski commented 5 years ago

I fully support. There is a package that allows to do this https://github.com/photogabble/laravel-remember-uploads

pedrofurtado commented 5 years ago

@goszowski Great package! Thanks for suggestion. Is it integrated with Laravel Media Library ( https://github.com/spatie/laravel-medialibrary ) ?

goszowski commented 5 years ago

@goszowski Great package! Thanks for suggestion. Is it integrated with Laravel Media Library ( https://github.com/spatie/laravel-medialibrary ) ?

Sorry, I do not know about this package.

pedrofurtado commented 5 years ago

@goszowski No problems, but thanks a lot for suggestion of package. I will try it in our application here 🤝