mirror of https://github.com/perkeep/perkeep.git
25652d66d9
When receiving a file, we were only trying to guess its MIME type through its contents (pkg/magic). We're now making a better effort at it by guessing from the filename extension if needed. Also: pkg/magic: get rid of all the extra video extensions that are already covered by mime.TypeByExtension. Because it's redundant and confusing. app/publisher, pkg/types/camtypes: also use mime.TypeByExtension as an extra effort. Especially since a reindex would be necessary to benefit from the pkg/index change. There are other places in Camlistore that could use such an effort. Maybe we should have a camtypes.*FileInfo.MIME() method that tries all the ways to guess the MIME type of the file? Change-Id: Ib9a2bc42af77c5394dac578ae415524b5111ad4e |
||
---|---|---|
.. | ||
testdata | ||
magic.go | ||
magic_test.go |