Open
Description
I ran into this error today trying to use this library with DigitalOCean Spaces.
error: Uncaught (in promise) S3Error: Failed to put object: 403 Forbidden
My code as below
import { S3, S3Bucket } from "https://deno.land/x/[email protected]/mod.ts";
const s3 = new S3({
accessKeyID: cfg.key,
secretKey: cfg.secret,
region: 'us-east-1',
endpointURL: 'nyc3.digitaloceanspaces.com',
});
const bucket = s3.getBucket('myspace');
const fileName = '/tmp/about.json';
const text = await Deno.readTextFile(fileName);
const result = await bucket.putObject('about.json', text, {
contentType: "application/json",
acl: "public-read"
});
I've enabled CORS, set headers to '*' , enable all methods etc. I don't have issue accessing Spaces, just this API. Thanks.
Metadata
Assignees
Labels
No labels
Activity