feat: add cmd flags
This commit is contained in:
@@ -14,8 +14,8 @@ import (
|
||||
// this function should only be called after manually checking the filetype
|
||||
func BuildFileRecord(r io.Reader, origName string, contentDirectory string) (File, error) {
|
||||
ext := filepath.Ext(origName)
|
||||
category, ok := utility.CategorizeMediaType(ext)
|
||||
if !ok {
|
||||
category := utility.CategorizeMediaType(ext)
|
||||
if category == utility.Unspecified {
|
||||
return File{}, fmt.Errorf("unsupported filetype")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user