1.1.43 • Published 12 months ago
strapi-provider-upload-supabase-4 v1.1.43
Strapi Upload Provider for Supabase storage
- This provider is a fork of shorwood's strapi upload provider digitalocean for Digital Ocean spaces, but applied to Supabase storage
Parameters
- apiUrl : Supabase API Url
- apiKey : Supabase API Key
- bucket : Supabase storage bucket
- directory : Directory inside Supabase storage bucket
- options : Supabase client additional options
How to use
- Install this package
npm i strapi-provider-upload-supabase-4
- Create config in
./config/plugins.js
with content
module.exports = ({ env }) => ({
// ...
upload: {
config: {
provider: "strapi-provider-upload-supabase-4",
providerOptions: {
apiUrl: env("SUPABASE_API_URL"),
apiKey: env("SUPABASE_API_KEY"),
bucket: env("SUPABASE_BUCKET"),
directory: env("SUPABASE_DIRECTORY"),
options: {},
},
actionOptions: {
upload: {},
uploadStream: {},
delete: {},
},
},
},
// ...
});
- Create
.env
and add to them
SUPABASE_API_URL="<Your Supabase url>"
SUPABASE_API_KEY="<Your Supabase api key>"
SUPABASE_BUCKET="strapi-uploads"
SUPABASE_DIRECTORY=""
- Create middleware in
./config/middlewares.js
with content
module.exports = ({ env }) => [
"strapi::errors",
{
name: "strapi::security",
config: {
contentSecurityPolicy: {
directives: {
"default-src": ["'self'"],
"img-src": ["'self'", "data:", "blob:", env("SUPABASE_API_URL")],
},
},
},
},
"strapi::cors",
"strapi::poweredBy",
"strapi::logger",
"strapi::query",
"strapi::body",
"strapi::session",
"strapi::favicon",
"strapi::public",
];
with values obtained from this page:
https://app.supabase.io/project//settings/api
Parameters options
, bucket
and directory
are optional and you can omit it, they will take the values shown in the example above.
Resources
Links
1.1.43
12 months ago
1.1.42
1 year ago
1.1.41
1 year ago
1.1.40
1 year ago
1.1.39
1 year ago
1.1.38
1 year ago
1.1.37
1 year ago
1.1.36
1 year ago
1.1.35
1 year ago
1.1.34
1 year ago
1.1.33
1 year ago
1.1.32
1 year ago
1.1.31
1 year ago
1.1.30
1 year ago
1.1.29
1 year ago
1.1.28
1 year ago
1.1.27
1 year ago
1.1.26
1 year ago
1.1.25
1 year ago
1.1.24
1 year ago
1.1.23
1 year ago
1.1.22
1 year ago
1.1.21
1 year ago
1.1.20
1 year ago
1.1.19
1 year ago
1.1.18
1 year ago
1.1.17
1 year ago
1.1.16
1 year ago
1.1.15
1 year ago
1.1.14
1 year ago
1.1.13
1 year ago
1.1.12
1 year ago
1.1.11
1 year ago
1.1.10
1 year ago
1.1.9
1 year ago
1.1.8
1 year ago
1.1.7
1 year ago
1.1.6
1 year ago
1.1.5
1 year ago
1.1.4
1 year ago
1.1.3
1 year ago
1.1.2
1 year ago
1.1.1
1 year ago
1.1.0
1 year ago