@webbio/strapi-provider-upload-local-prefix
v0.0.5
Published
A strapi local upload provider with prefix option to set a base url for all uploaded files
Downloads
186
Maintainers
Keywords
Readme
strapi-provider-upload-local-prefix
This provider extends the @strapi/provider-upload-local
package with an additional option: baseUrl
. This optional property will prefix the uploaded file's url.
Most providers already implement baseUrl as an option, but this local development provider prevents refactoring your implementations when using image urls.
Implementation
config/plugins.js
module.exports = ({ env }) => ({
// ...
upload: {
config: {
provider: '@webbio/strapi-provider-upload-local-prefix',
providerOptions: {
baseUrl: env('STRAPI_URL') // This can be any string
}
}
}
// ...
});
config/plugins.ts
export default ({ env }) => ({
// ...
upload: {
config: {
provider: '@webbio/strapi-provider-upload-local-prefix',
providerOptions: {
baseUrl: env('STRAPI_URL') // This can be any string
}
}
}
// ...
});