I noticed that, filetype was determined by filename extension, see utils.go, this workes in most case, but, if we can determine filetype by its magic number signature, it well be better, since filename extension may be changed unexpectly.
there is a package called h2non/filetype, maybe we can use that package in the project
I noticed that, filetype was determined by filename extension, see utils.go, this workes in most case, but, if we can determine filetype by its magic number signature, it well be better, since filename extension may be changed unexpectly.
there is a package called h2non/filetype, maybe we can use that package in the project