packages/providers/upload-local/README.md
# using yarn
yarn add @strapi/provider-upload-local
# using npm
npm install @strapi/provider-upload-local --save
This provider has only one parameter: sizeLimit.
./config/plugins.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 1000000000 (1GB). 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 — it defaults to roughly 200MB, and rejects larger files before the upload plugin ever sees them. Read more here
Special configuration of the Strapi Security Middleware is not required on this provider since the default configuration allows loading images and media from "'self'".