change mimetype back to file: no mimetype command on MacOs

This commit is contained in:
zelig 2015-06-02 14:48:56 +01:00
parent aae5551978
commit e8ce29d58d

View file

@ -266,8 +266,8 @@ func (self *Api) Upload(lpath, index string) (string, error) {
wg.Wait() wg.Wait()
} }
if err == nil { if err == nil {
//cmd := exec.Command("file", "--mime-type", "-b", entry.Path) cmd := exec.Command("file", "--mime-type", "-b", entry.Path)
cmd := exec.Command("mimetype", "-b", entry.Path) // cmd := exec.Command("mimetype", "-b", entry.Path)
var out bytes.Buffer var out bytes.Buffer
cmd.Stdout = &out cmd.Stdout = &out
err = cmd.Run() err = cmd.Run()