Redirect to /meta after upload/shorten

This commit is contained in:
Daan Sprenkels
2019-12-16 10:51:21 +05:30
parent d34ac11d5e
commit ca859adab1
9 changed files with 32 additions and 67 deletions

View File

@@ -9,6 +9,7 @@ import (
"net/url"
"os"
"path"
"path/filepath"
"github.com/google/uuid"
"github.com/pkg/errors"
@@ -214,3 +215,8 @@ func (fu *FileUpload) URL() *url.URL {
}
return urlParse
}
// Ext returns the extension of the file attached to this FileUpload.
func (fu *FileUpload) Ext() string {
return filepath.Ext(fu.FileName)
}