瀏覽代碼

error checking

tags/v1.1.0
Andrea Spacca 4 年之前
父節點
當前提交
4a1697ee60
共有 1 個檔案被更改,包括 6 行新增0 行删除
  1. +6
    -0
      server/storage.go

+ 6
- 0
server/storage.go 查看文件

@@ -152,6 +152,9 @@ func (s *S3Storage) Head(token string, filename string) (contentType string, con

// content type , content length
response, err := s.s3.HeadObject(headRequest)
if err != nil {
return
}

if response.ContentType != nil {
contentType = *response.ContentType
@@ -188,6 +191,9 @@ func (s *S3Storage) Get(token string, filename string) (reader io.ReadCloser, co
}

response, err := s.s3.GetObject(getRequest)
if err != nil {
return
}

if response.ContentType != nil {
contentType = *response.ContentType


Loading…
取消
儲存