cloudverve / wordpress-cloud-media-offloader-plugin

A simple plugin that allows you to serve your WordPress Media Library files from the Backblaze B2 cloud storage service.
GNU General Public License v2.0
65 stars 14 forks source link

B2 App Key Auth #12

Open joelmacklow opened 5 years ago

joelmacklow commented 5 years ago

Versions

Description of Issue/Request

Hi Daniel. Just taking a look at using this plugin that you've written. I'm far from being a coder, but would like to help out if I can :)

I've tried to use this with a B2 app key instead of the master key as I want to be able to protect the master key as this plugin will be installed on a client WP site using a bucket in our account.

When I enter the app key and save the settings, no buckets are in the list, even though the app key has the list buckets permission. I have limited the app key to a single bucket. I should mention that it does work fine if I do use the master key.

Is there something I need to change for this to work or can this only work using the master key?

phaberest commented 5 years ago

I'm afraid this is a pretty common issue, this repo might be using the old api that do not recognise bucket specific key but instead they only allow the global api key. I had the same issue with the cli script I use to upload my weekly backups.

hxrsmurf commented 4 years ago

I'm very new at coding and wanted to have a way to have backblaze as my backend storage instead of local storage or S3. Here's my version of a very, very basic start of the API key per bucket: https://github.com/hxrsmurf/backblaze-php