Browse Source

set file name to base file name

fixing https://github.com/chrislusf/seaweedfs/issues/632
pull/637/head
Chris Lu 7 years ago
parent
commit
fc3924ac70
  1. 2
      weed/operation/submit.go

2
weed/operation/submit.go

@ -104,7 +104,7 @@ func newFilePart(fullPathFilename string) (ret FilePart, err error) {
ret.FileSize = fi.Size() ret.FileSize = fi.Size()
ext := strings.ToLower(path.Ext(fullPathFilename)) ext := strings.ToLower(path.Ext(fullPathFilename))
ret.IsGzipped = ext == ".gz" ret.IsGzipped = ext == ".gz"
ret.FileName = fullPathFilename
ret.FileName = fi.Name()
if ext != "" { if ext != "" {
ret.MimeType = mime.TypeByExtension(ext) ret.MimeType = mime.TypeByExtension(ext)
} }

Loading…
Cancel
Save