mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-27 14:40:18 +01:00
added content type by extension for local storage
This commit is contained in:
parent
9e3f4ec4fb
commit
2d303a68a6
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/goamz/goamz/s3"
|
"github.com/goamz/goamz/s3"
|
||||||
"io"
|
"io"
|
||||||
|
"mime"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -37,7 +38,7 @@ func (s *LocalStorage) Get(token string, filename string) (reader io.ReadCloser,
|
||||||
|
|
||||||
contentLength = uint64(fi.Size())
|
contentLength = uint64(fi.Size())
|
||||||
|
|
||||||
contentType = ""
|
contentType = mime.TypeByExtension(filepath.Ext(filename))
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue