소스 검색

added content type by extension for local storage

tags/v1.0.0
Remco 9 년 전
부모
커밋
2d303a68a6
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. +2
    -1
      transfersh-server/storage.go

+ 2
- 1
transfersh-server/storage.go 파일 보기

@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/goamz/goamz/s3"
"io"
"mime"
"os"
"path/filepath"
"strconv"
@@ -37,7 +38,7 @@ func (s *LocalStorage) Get(token string, filename string) (reader io.ReadCloser,

contentLength = uint64(fi.Size())

contentType = ""
contentType = mime.TypeByExtension(filepath.Ext(filename))

return
}


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