소스 검색

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


불러오는 중...
취소
저장