Nanoseconds Produce Minutes

    @strapi/provider-upload-rackspace

    4.1.11 • Public • Published

    @strapi/provider-upload-rackspace

    Resources

    Links

    Installation

    # using yarn
    yarn add @strapi/provider-upload-rackspace
    
    # using npm
    npm install @strapi/provider-upload-rackspace --save

    Configurations

    Your configuration is passed down to the client initialization. (e.g: createClient(config)). The implementation is based on the package pkgcloud. You can read the docs here.

    See the using a provider documentation for information on installing and using a provider. And see the environment variables for setting and using environment variables in your configs.

    Provider Configuration

    ./config/plugins.js

    module.exports = ({ env }) => ({
      // ...
      upload: {
        config: {
          provider: 'rackspace',
          providerOptions: {
            username: env('RACKSPACE_USERNAME'),
            apiKey: env('RACKSPACE_KEY'),
            region: env('RACKSPACE_REGION'),
            container: env('RACKSPACE_CONTAINER'),
          },
        },
      },
      // ...
    });

    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:', 'storage.clouddrive.com'],
              'media-src': ["'self'", 'data:', 'blob:', 'storage.clouddrive.com'],
              upgradeInsecureRequests: null,
            },
          },
        },
      },
      // ...
    ];

    Keywords

    none

    Install

    npm i @strapi/provider-upload-rackspace

    DownloadsWeekly Downloads

    114

    Version

    4.1.11

    License

    SEE LICENSE IN LICENSE

    Unpacked Size

    6.43 kB

    Total Files

    4

    Last publish

    Collaborators

    • lauriejim
    • pierreburgy
    • soupette
    • aurelsicoko
    • hichamelbsi
    • alexandrebodin
    • petersg83
    • convly