Photo uploads: make file extension check case-insensitive
This commit is contained in:
parent
e80d4e6ad6
commit
13aa5a8544
|
@ -35,8 +35,8 @@ type UploadConfig struct {
|
|||
// - error on errors
|
||||
func UploadPhoto(cfg UploadConfig) (string, string, error) {
|
||||
// Validate and normalize the extension.
|
||||
var extension = cfg.Extension
|
||||
switch cfg.Extension {
|
||||
var extension = strings.ToLower(cfg.Extension)
|
||||
switch extension {
|
||||
case ".jpg":
|
||||
fallthrough
|
||||
case ".jpe":
|
||||
|
|
Reference in New Issue
Block a user