0.0.5 • Published 5 months ago
@webbio/strapi-provider-upload-local-prefix v0.0.5
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
}
}
}
// ...
});