@uppy/aws-s3-multipart upload with digitalocean spaces?

Started by mcabrams2 replies2,492 views
teygarcia
#2

Hi,

I had the same situation you described.
You need to set the correct CORS configuration in your bucket. For that you can upload a configuration file to Digital Ocean by s3cmd.

First of all, set up s3cmd:

Then create the xml file (CORS file sample):

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedMethod>DELETE</AllowedMethod>
        <MaxAgeSeconds>3000</MaxAgeSeconds>
        <ExposeHeader>ETag</ExposeHeader>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>

Finally, upload it to DO:

$ s3cmd setcors FILE s3://BUCKET
memije
#3

Pudieras poner el ejemplo completo de como subir archivos a Digital Ocean desde Uppy JS?