@strapi/provider-upload-local
TypeScript icon, indicating that this package has built-in type declarations

4.25.1 • Public • Published

@strapi/provider-upload-local

Resources

Links

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'".

Readme

Keywords

Package Sidebar

Install

npm i @strapi/provider-upload-local

Homepage

strapi.io

Weekly Downloads

82,526

Version

4.25.1

License

SEE LICENSE IN LICENSE

Unpacked Size

25.7 kB

Total Files

9

Last publish

Collaborators

  • baronvoninternet
  • remidej
  • tdfka_rick
  • marc-roig-strapi
  • lauriejim
  • pierreburgy
  • aurelsicoko
  • alexandrebodin
  • convly