binaryfire
Optimizing / compressing image uploads before saving to disk (no media library)
@Lara Zeus Saw that one. It’s using Spatie Media Library. That’s lots of code I’d need to dig through to use it as a reference - including deep diving into the Spatie package and the Filament integration for it.
I’m definitely not opposed to source diving, but it’s a huge amount of work for what (I think?) must have an easy solution. Eg some way to access the path of uploads while they’re still in Livewire’s tmp dir and process them before they are moved from there to the disk?
7 replies
Autosave entire edit form with debounce
Back to the autosave though - I think some kind of drafts / restore draft dialog system is pretty essential tbh. Data loss when authoring long-form content is such deal-breaker for so many apps. Dan wasn't above adding some extra tables for import / export. Maybe he'd consider something similar for an autosave feature?
Otherwise a plugin would be great, but I'm not sure you'd be able to hook into enough core functionality with a plugin to make it work
31 replies
Autosave entire edit form with debounce
Could also take a look at the form hash logic that the unsaved changes feature uses. I dug into that a bit in my PR to add it to SPA mode. It takes a hash of the current state, then compares it to the current state when the user tries to leave the page. It all happens on the frontend.
I wonder if something similar could be used to prevent endless polling if the user leaves a page open overnight?
31 replies
Autosave entire edit form with debounce
Separate drafts table + a relationship to the resource which is checked when the edit form is re-opened, and if an entry is found, a modal appears saying there's an autosave and do you want to restore it
31 replies