cmd/swarm, swarm/api: Fix broken up cmd due to #3742

Added mimetype hint input to new uploadfile function
This commit is contained in:
nolash 2017-04-05 19:50:11 +02:00
parent 4cfa5127ae
commit a1a2584825

View file

@ -97,7 +97,7 @@ func (c *Client) UploadFile(file string, fi os.FileInfo, mimetype_hint string) (
log.Info("Mime type set by override", "mime", mimetype)
} else {
ext := filepath.Ext(file)
log.Info("Ext" , "ext", ext, "file", file)
log.Info("Ext", "ext", ext, "file", file)
if ext != "" {
mimetype = mime.TypeByExtension(filepath.Ext(fi.Name()))
log.Info("Mime type set by fileextension", "mime", mimetype, "ext", filepath.Ext(file))