S3 SymLink fix

The copy source should be the name of the source bucket and key name
of the source object, separated by a slash (/).
This commit is contained in:
Petr Jediný
2018-01-17 13:39:01 +01:00
parent 60fb415150
commit 12e2982362
2 changed files with 3 additions and 2 deletions

View File

@@ -29,4 +29,5 @@ List of contributors, in chronological order:
* Clemens Rabe (https://github.com/seeraven)
* TJ Merritt (https://github.com/tjmerritt)
* Matt Martyn (https://github.com/MMartyn)
* Ludovico Cavedon (https://github.com/cavedon)
* Ludovico Cavedon (https://github.com/cavedon)
* Petr Jediny (https://github.com/pjediny)

View File

@@ -393,7 +393,7 @@ func (storage *PublishedStorage) SymLink(src string, dst string) error {
params := &s3.CopyObjectInput{
Bucket: aws.String(storage.bucket),
CopySource: aws.String(filepath.Join(storage.prefix, src)),
CopySource: aws.String(filepath.Join(storage.bucket, storage.prefix, src)),
Key: aws.String(filepath.Join(storage.prefix, dst)),
ACL: aws.String(storage.acl),
Metadata: map[string]*string{