Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitLab with WP-CLI:
wp plugin install https://gitlab.com/skript-cc/common/flysystem-wordpress-plugin/-/archive/master/flysystem-wordpress-plugin-master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Flysystem Uploads - Wordpress Plugin
The goal of this plugin is to offload media uploads in Wordpress to a
filesystem of choice.
Architecture
Building blocks
https://flysystem.thephpleague.com/v1/docs/
https://github.com/deliciousbrains/wp-background-processing
Steps
Find the relevant hooks to get notified about media uploads, edits and
deletions.
wphandleupload
wphandleuploadprefilter
wpuploadbits
premoveuploadedfile
wpdeletefile
wpupdateattachmentmetadata
wpgenerateattachmentmetadata
addattachment
deleteattachment
editattachment
Upload flow
wphandleupload is called
wphandleuploadprefilter is applied and receives/mutates a 'Reference to a single element of $\FILES' (an array with file upload data)
Some error checks and tests are done (e.g. whether upload dir is writable)
premoveuploadedfile is applied. When $movenewfile is set to a non null value, the uploaded file won't be moved to the uploads dir.
Regardless of whether the uploaded file is moved or not, the new file is chmodded
Finally wphandleupload is applied and receives/mutates an assoc array with the new file name, url and file type
Create async acti