mirror of
https://github.com/vbatts/imgsrv.git
synced 2025-06-30 14:38:28 +00:00
adding layout for audio mime type files
This commit is contained in:
parent
f5f345859c
commit
eb1946b223
2 changed files with 21 additions and 2 deletions
|
@ -29,11 +29,16 @@ func (f *File) SetContentType() {
|
|||
}
|
||||
|
||||
func (f *File) IsImage() bool {
|
||||
f.SetContentType()
|
||||
f.SetContentType()
|
||||
return strings.HasPrefix(f.ContentType, "image")
|
||||
}
|
||||
|
||||
func (f *File) IsVideo() bool {
|
||||
f.SetContentType()
|
||||
f.SetContentType()
|
||||
return strings.HasPrefix(f.ContentType, "video")
|
||||
}
|
||||
|
||||
func (f *File) IsAudio() bool {
|
||||
f.SetContentType()
|
||||
return strings.HasPrefix(f.ContentType, "audio")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue