laravel-mediable
laravel-mediable copied to clipboard
Manipulating uploaded file?
Hi,
I'd like to manipulate an uploaded file right away. For example: changing the file format from jpg to webp.
From what I gather you need to first store the uploaded file, then create a variant and promote it to original status and then remove the old file.
I'm looking to do that in one step right off the bat. Is that possible?
Yes, it is currently designed to be multi step. Since manipulation can be a little heavier, it is recommended to do it async, which means you have to put the file somewhere. That said, it certainly could be done synchronously in the upload process. PRs are always welcome 🙂
Cool, I'll go with the multi-step and see if I really need it in one step later on. If so you'll get that PR. :)
Implemented in upcoming major version #343
Version 6.0.0 has been released.