Services
Digital Ocean Spaces

DigitalOcean Spaces

Installation

Install S3 service

yarn add @uplo/service-s3

Add service to Uplo

import S3Service from '@uplo/service-s3'
 
const uplo = Uplo({
  services: {
    digitalocean: S3Service({
      isPublic: false,
      endpoint: 'https://nyc3.digitaloceanspaces.com',
      forcePathStyle: true,
      bucket: 'your-bucket',
      accessKeyId: '*****',
      secretAccessKey: '*****',
    }),
  },
})

Configure DigitalOcean Space

Add CORS with PUT as allowed Method and add these allowed Headers:

  • Content-Length
  • Content-MD5
  • Content-Type
  • x-amz-acl

These headers are used for direct upload