• Resolved morroni

    (@lmorroni)


    Hello,
    I am wondering if it is possible to use this plugin to recursively search through the media folder on Minio and synch the WP media library. Our use case is that we have editors managing WP on a staging server which uploads media assets to minio via this plugin. The live server is referencing the same minio server for it’s media library. If a file is added to minio from staging then I’d like to see it show on production without having to overwrite the production DB.
    Thanks for a great plugin.
    Larry

Viewing 1 replies (of 1 total)
  • Plugin Author interfacelab

    (@interfacelab)

    Thanks for the kind words.

    Unfortunately, it’s not possible with the plugin. If you wanted to write the script yourself to do it, the plugin stores all the cloud related info in the attachment’s meta called ‘s3’ and is a serialized PHP array:

    
    array (
      'url' => 'https://your-bucket.s3-accelerate.amazonaws.com/2018/09/image.png',
      'bucket' => 'your-bucket',
      'privacy' => 'public-read',
      'key' => '2018/09/image.png',
      'provider' => 's3',
      'options' => 
      array (
      ),
      'mime-type' => 'image/png',
    )
    

    So you would loop through minio, create the attachment with wp-cli and then update the new attachment’s meta data with the above. Something like that.

    The plugin does have some wp-cli commands in the classes/CLI directory. You could use this a starting point to write a wp-cli command that you could then contribute to the plugin in github ??

    Good luck ??

Viewing 1 replies (of 1 total)
  • The topic ‘Synch Cloud Files With Database’ is closed to new replies.