Is it a 403, or a 404? Screenshot of the error page?
Is it a 403, or a 404? Screenshot of the error page?

@aws-sdk/client-s3 DeleteObjectCommand .DeleteObjectCommand is technically not supported yet but are there any other ways to do this from workers?



storage::s3: Error getting object: ErrGetObject(Unhandled(Unhandled { source: ErrorMetadata { code: Some("NoSuchBucket"), message: Some("The specified bucket does not exist."), extras: None }, meta: ErrorMetadata { code: Some("NoSuchBucket"), message: Some("The specified bucket does not exist."), extras: None } }))
weur but maybe I should use eeur?The region name 'eu-central-1' is not valid. Must be one of: wnam, enam, weur, eeur, apac, auto"https://<hidden>.eu.r2.cloudflarestorage.com/rsmono-developS3_URL and one called S3_STORAGE_BUCKET so since the bucket name is in the url I don't know what to do and what I tried so far return NoSuchBucketAlertReceived(HandshakeFailure). What does that indicate?@aws-sdk/client-s3DeleteObjectCommandDeleteObjectCommandFailed to load resource: Origin https://sabetudo.ai is not allowed by Access-Control-Allow-Origin. Status code: 200[
{
"AllowedOrigins": [
"*",
"https://sabetudo.ai",
"https://www.sabetudo.ai",
"http://localhost"
],
"AllowedMethods": [
"GET",
"HEAD"
],
"ExposeHeaders": [
"Content-Type",
"Access-Control-Allow-Origin",
"ETag"
]
}
]storage::s3: Error getting object: ErrGetObject(Unhandled(Unhandled { source: ErrorMetadata { code: Some("NoSuchBucket"), message: Some("The specified bucket does not exist."), extras: None }, meta: ErrorMetadata { code: Some("NoSuchBucket"), message: Some("The specified bucket does not exist."), extras: None } }))weureeurThe region name 'eu-central-1' is not valid. Must be one of: wnam, enam, weur, eeur, apac, auto"https://<hidden>.eu.r2.cloudflarestorage.com/rsmono-developS3_URLS3_STORAGE_BUCKETNoSuchBucketAlertReceived(HandshakeFailure)[
{
"AllowedOrigins": [
"*"
],
"AllowedMethods": [
"GET",
"PUT",
"POST"
],
"AllowedHeaders": [
"*"
]
}
] try {
const url = new URL(request.url);
const params = url.searchParams;
const key = params.get('key');
console.log('key', key);
const data = await S3.send(new DeleteObjectCommand({
Bucket: 'fakeBucket',
Key: key
}));
return new Response(JSON.stringify({
msg: 'I mean, something happened!',
data: data
}), {
status: 200,
headers: headers
});
} catch (err) {
return new Response(JSON.stringify(
{
msg: 'Error',
error: err
}),
{
status: 500,
headers: headers
});
}{
"msg": "Error",
"error": {
"$metadata": {
"attempts": 1,
"totalRetryDelay": 0
}
}
}