You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ws fe72798501
update
3 months ago
..
src update 3 months ago
.eslintignore update 3 months ago
.eslintrc.js update 3 months ago
.gitignore update 3 months ago
.npmignore update 3 months ago
LICENSE update 3 months ago
README.md update 3 months ago
jest.config.js update 3 months ago
package.json update 3 months ago
rollup.config.mjs update 3 months ago
tsconfig.build.json update 3 months ago
tsconfig.eslint.json update 3 months ago
tsconfig.json update 3 months ago

README.md

@strapi/provider-upload-local

Resources

Installation

# using yarn
yarn add @strapi/provider-upload-local

# using npm
npm install @strapi/provider-upload-local --save

Configurations

This provider has only one parameter: sizeLimit.

Provider Configuration

./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 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

Security Middleware Configuration

Special configuration of the Strapi Security Middleware is not required on this provider since the default configuration allows loading images and media from "'self'".