Documentation ¶
Overview ¶
package objects provides the customizations for the object upload middleware
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingParent = fmt.Errorf("parent id or type is missing")
View Source
var MimeTypeValidator objects.ValidationFunc = func(f objects.File) error { if mimes, ok := validMimeTypes[f.FieldName]; ok { return objects.MimeTypeValidator(mimes...)(f) } return nil }
MimeTypeValidator returns a validation function for the given key
Functions ¶
func AddFilePermissions ¶ added in v0.3.1
func Upload ¶
func Upload(ctx context.Context, u *objects.Objects, files []objects.FileUpload) ([]objects.File, error)
Upload handles the file Upload process per key in the multipart form and returns the uploaded files in addition to uploading the files to the storage, it also creates the file in the database
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.