Code Monkey home page Code Monkey logo

strapi-provider-upload-digitaloceanspace's Introduction

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. 'https://cdn.example.com')

How to use

  1. Install this package
npm i strapi-provider-upload-do
  1. Create config in ./extensions/upload/config/settings.js with content
module.exports = {
  provider: "do",
  providerOptions: {
    key: process.env.DO_SPACE_ACCESS_KEY,
    secret: process.env.DO_SPACE_SECRET_KEY,
    endpoint: process.env.DO_SPACE_ENDPOINT,
    space: process.env.DO_SPACE_BUCKET,
    directory: process.env.DO_SPACE_DIRECTORY,
    cdn: process.env.DO_SPACE_CDN,
  }
}
  1. Create .env and add to them
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

Links

Contributors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.