New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

strapi-provider-upload-do

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strapi-provider-upload-do

Digital ocean spaces provider for Strapi upload plugin

3.6.9
latest
Source
npm
Version published
Weekly downloads
610
-3.94%
Maintainers
1
Weekly downloads
 
Created
Source

Strapi Upload Provider for Digital Ocean Spaces

  • This provider is a fork of AdamZikmund's strapi upload provider for Digital Ocean spaces.

This provider will upload to the space using the AWS S3 API.

Parameters

  • key : Space access key
  • secret : Space access secret
  • endpoint : Base URL of the space (e.g. fra.digitaloceanspaces.com)
  • space : Name of the space in the Digital Ocean panel.
  • directory : Name of the sub-directory you want to store your files in. (Optionnal - e.g. /example)
  • cdn : CDN Endpoint - URL of the cdn of the space (Optionnal - e.g. cdn.example.com)

How to use

  • Install this package
npm i strapi-provider-upload-do
yarn add strapi-provider-upload-do
pnpm add strapi-provider-upload-do
  • Create or update config in ./config/plugins.js with content
module.exports = ({env}) => ({
  // ...
  upload: {
    config: {
      provider: "strapi-provider-upload-do", 
      providerOptions: {
        key: env('DO_SPACE_ACCESS_KEY'),
        secret: env('DO_SPACE_SECRET_KEY'),
        endpoint: env('DO_SPACE_ENDPOINT'),
        space: env('DO_SPACE_BUCKET'),
        directory: env('DO_SPACE_DIRECTORY'),
        cdn: env('DO_SPACE_CDN'),
      }
    },
  }, 
  // ...
})

  • Create .env and add provide Digital Ocean config.
DO_SPACE_ACCESS_KEY=
DO_SPACE_SECRET_KEY=
DO_SPACE_ENDPOINT=
DO_SPACE_BUCKET=
DO_SPACE_DIRECTORY=
DO_SPACE_CDN=

with values obtained from tutorial:

https://www.digitalocean.com/community/tutorials/how-to-create-a-digitalocean-space-and-api-key

Parameter DO_SPACE_DIRECTORY and DO_SPACE_CDN is optional and you can ommit them both in .env and settings.

Resources

Contributors

Keywords

upload

FAQs

Package last updated on 05 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts