Hello,
I am trying to make a copy of a file in Spaces
If putting in a new file with
bucket := "someBucket"
object := s3.PutObjectInput{
Bucket: aws.String(bucket),
Key: aws.String(key),
...
}
it works, but if copying
bucket := "someBucket"
cpObj := s3.CopyObjectInput{
Bucket: aws.String(bucket),
CopySource: aws.String(fromPath),
Key: aws.String(toPath),
}
_, err := cl.CopyObject(&cpObj)
log.Println("Error", err)
it logs:
Error NoSuchBucket
It does not make any sense to me. Any help appreciated. :)
Mila
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
I have programmed around it in my code. I have not found a way how to persuade CopyObjectInput to work as intended.
This comment has been deleted
Click below to sign up and get $100 of credit to try our products over 60 days!
Hi nicmila,
the same is happening for me with node.js and
@aws-sdk/client-s3@3.23.0
. Whenever I callcopyObject
the same way you did, the client errors out withNoSuchBucket
even though I use the same bucket name for other functions likeputObject
. This seems to be a bug/missing feature on DigitalOcean’s end then… Were you able to solve your problem?