strapi-provider-upload-ovh

4.15.5 • Public • Published

strapi-provider-upload-ovh

Resources

Links

Installation

# using yarn
yarn add strapi-provider-upload-ovh

# using npm
npm install strapi-provider-upload-ovh --save

Provider Configuration

./config/plugins.js

module.exports = ({ env }) => ({
  // ...
  upload: {
    config: {
      provider: 'ovh',
      providerOptions: {
        keystoneAuthVersion: 'v3',
        provider: 'openstack',
        username: env('STORAGE_USERNAME'),
        password: env('STORAGE_PASSWORD'),
        region: env('STORAGE_REGION', 'GRA'),
        domainId: env('STORAGE_DOMAIN_ID', 'default'),
        domainName: env('STORAGE_TENANT_NAME', 'tenant_name'),
        authUrl: env('STORAGE_AUTH_URL', 'https://auth.cloud.ovh.net/'),
        defaultContainerName: env('STORAGE_CONTAINER_NAME'),
        publicUrlPrefix: env('STORAGE_PUBLIC_URL_PREFIX')
      }
    },
  },
  // ...
});

Security Middleware Configuration

Due to the default settings in the Strapi Security Middleware you will need to modify the contentSecurityPolicy settings to properly see thumbnail previews in the Media Library. You should replace strapi::security string with the object bellow instead as explained in the middleware configuration documentation.

./config/middlewares.js

module.exports = [
  // ...
  {
    name: 'strapi::security',
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          'connect-src': ["'self'", 'https:'],
          'img-src': ["'self'", 'data:', 'blob:', 'https://auth.cloud.ovh.net'],
          'media-src': ["'self'", 'data:', 'blob:', 'https://auth.cloud.ovh.net'],
          upgradeInsecureRequests: null,
        },
      },
    },
  },
  // ...
];

Package Sidebar

Install

npm i strapi-provider-upload-ovh

Homepage

strapi.io

Weekly Downloads

2

Version

4.15.5

License

SEE LICENSE IN LICENSE

Unpacked Size

177 kB

Total Files

7

Last publish

Collaborators

  • cto-akatek