Documentation ¶
Index ¶
- Constants
- Variables
- func CheckFile(handler *multipart.FileHeader, file multipart.File) (marshal.Response, error)
- func CopyFileTemp(w http.ResponseWriter, file multipart.File) (string, error)
- func GenUuidFilename(origFilename string) string
- func PutToS3(errChan chan marshal.Response, multipartFile multipart.File, ...)
- func ReadFile(filename string) (string, error)
Constants ¶
View Source
const (
// 2.5 MiB max file size
MAX_FILE_SIZE = 10 << 18
)
Variables ¶
View Source
var ( ALLOWED_MIME_TYPES = []string{"image/jpeg", "image/png", "image/gif"} FILE_SIZE_UNIT = math.Pow(1024, 2) // MiB FS_UNIT_NAME = "MiB" )
Functions ¶
func CopyFileTemp ¶
func GenUuidFilename ¶
Generate a new filename based on UUID4 + the original file extension
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.