Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultFileUploadOptions = &UploadOptions{ FieldName: "file", Validation: &UploadValidationOptions{ AllowedExts: []string{ "txt", "pdf", "doc", }, AllowedMimeTypes: []string{ "text/plain", "application/msword", "application/x-pdf", "application/pdf", }, }, ItemURLFunc: func(item stow.Item) (string, error) { return item.URL().String(), nil }, }
View Source
var DefaultImageUploadOptions = &UploadOptions{ FieldName: "file", Validation: &UploadValidationOptions{ AllowedExts: []string{ "gif", "jpeg", "jpg", "png", "svg", "blob", }, AllowedMimeTypes: []string{ "image/gif", "image/jpeg", "image/pjpeg", "image/x-png", "image/png", "image/svg+xml", }, }, ItemURLFunc: func(item stow.Item) (string, error) { return item.URL().String(), nil }, Resize: "", }
View Source
var DeleteFileHandler = http.HandlerFunc(deleteFile)
View Source
var DeleteImageHandler = http.HandlerFunc(deleteImage)
View Source
var LoadImagesHandler = http.HandlerFunc(loadImages)
View Source
var UploadFileHandler = http.HandlerFunc(uploadFile)
View Source
var UploadFileValidationHandler = http.HandlerFunc(uploadFileValidation)
View Source
var UploadImageHandler = http.HandlerFunc(uploadImage)
View Source
var UploadImageResizeHandler = http.HandlerFunc(uploadImageResize)
View Source
var UploadImageValidationHandler = http.HandlerFunc(uploadImageValidation)
Functions ¶
func NewServeMux ¶
Types ¶
type UploadOptions ¶
type UploadOptions struct {
FieldName string
Validation *UploadValidationOptions
Resize string
ItemURLFunc func(item stow.Item) (string, error)
}
var ( FileUploadOptions *UploadOptions ImageUploadOptions *UploadOptions Container stow.Container )
type UploadValidationOptions ¶
Click to show internal directories.
Click to hide internal directories.