Skip to content

Commit

Permalink
storage: set ContentDisposition
Browse files Browse the repository at this point in the history
Due to an oversight, this field was never copied from the raw object.

Fixes #705.

Change-Id: I7d02d708b5a1647b7eacafe9b3f2d4011b513a38
Reviewed-on: https://code-review.googlesource.com/15090
Reviewed-by: Michael Darakananda <[email protected]>
  • Loading branch information
jba committed Jul 27, 2017
1 parent ef305da commit 5d53027
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -812,26 +812,27 @@ func newObject(o *raw.Object) *ObjectAttrs {
sha256 = o.CustomerEncryption.KeySha256
}
return &ObjectAttrs{
Bucket: o.Bucket,
Name: o.Name,
ContentType: o.ContentType,
ContentLanguage: o.ContentLanguage,
CacheControl: o.CacheControl,
ACL: acl,
Owner: owner,
ContentEncoding: o.ContentEncoding,
Size: int64(o.Size),
MD5: md5,
CRC32C: crc32c,
MediaLink: o.MediaLink,
Metadata: o.Metadata,
Generation: o.Generation,
Metageneration: o.Metageneration,
StorageClass: o.StorageClass,
CustomerKeySHA256: sha256,
Created: convertTime(o.TimeCreated),
Deleted: convertTime(o.TimeDeleted),
Updated: convertTime(o.Updated),
Bucket: o.Bucket,
Name: o.Name,
ContentType: o.ContentType,
ContentLanguage: o.ContentLanguage,
CacheControl: o.CacheControl,
ACL: acl,
Owner: owner,
ContentEncoding: o.ContentEncoding,
ContentDisposition: o.ContentDisposition,
Size: int64(o.Size),
MD5: md5,
CRC32C: crc32c,
MediaLink: o.MediaLink,
Metadata: o.Metadata,
Generation: o.Generation,
Metageneration: o.Metageneration,
StorageClass: o.StorageClass,
CustomerKeySHA256: sha256,
Created: convertTime(o.TimeCreated),
Deleted: convertTime(o.TimeDeleted),
Updated: convertTime(o.Updated),
}
}

Expand Down

0 comments on commit 5d53027

Please sign in to comment.