Local provider for strapi upload
npm install @codeparticle/strapi-provider-upload-local- LICENSE
- Strapi website
- Strapi documentation
- Strapi community on Discord
- Strapi news on Twitter
``bashusing yarn
yarn add @codeparticle/strapi-provider-upload-local
Configurations
This provider has only one parameter:
sizeLimit.$3
./config/plugins.js`js
module.exports = ({ env }) => ({
// ...
upload: {
config: {
provider: 'local',
providerOptions: {
sizeLimit: 100000,
},
},
},
// ...
});
`The
sizeLimit parameter must be a number. Be aware that the unit is in bytes, and the default is 1000000. When setting this value high, you should make sure to also configure the body parser middleware maxFileSize so the file can be sent and processed. Read more here$3
Special configuration of the Strapi Security Middleware is not required on this provider since the default configuration allows loading images and media from
"'self'"`.