mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
cmd/swarm, swarm/api: Fix broken up cmd due to #3742
Added mimetype hint input to new uploadfile function
This commit is contained in:
parent
4cfa5127ae
commit
a1a2584825
1 changed files with 6 additions and 6 deletions
|
|
@ -97,8 +97,8 @@ func (c *Client) UploadFile(file string, fi os.FileInfo, mimetype_hint string) (
|
||||||
log.Info("Mime type set by override", "mime", mimetype)
|
log.Info("Mime type set by override", "mime", mimetype)
|
||||||
} else {
|
} else {
|
||||||
ext := filepath.Ext(file)
|
ext := filepath.Ext(file)
|
||||||
log.Info("Ext" , "ext", ext, "file", file)
|
log.Info("Ext", "ext", ext, "file", file)
|
||||||
if ext != "" {
|
if ext != "" {
|
||||||
mimetype = mime.TypeByExtension(filepath.Ext(fi.Name()))
|
mimetype = mime.TypeByExtension(filepath.Ext(fi.Name()))
|
||||||
log.Info("Mime type set by fileextension", "mime", mimetype, "ext", filepath.Ext(file))
|
log.Info("Mime type set by fileextension", "mime", mimetype, "ext", filepath.Ext(file))
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue