upload

package
v1.21.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUploadContext added in v1.13.0

func AddUploadContext(ctx *context.Context, uploadType string)

AddUploadContext renders template values for dropzone

func IsErrFileTypeForbidden

func IsErrFileTypeForbidden(err error) bool

IsErrFileTypeForbidden checks if an error is a ErrFileTypeForbidden.

func Verify added in v1.13.0

func Verify(buf []byte, fileName, allowedTypesStr string) error

Verify validates whether a file is allowed to be uploaded.

Types

type ErrFileTypeForbidden

type ErrFileTypeForbidden struct {
	Type string
}

ErrFileTypeForbidden not allowed file type error

func (ErrFileTypeForbidden) Error

func (err ErrFileTypeForbidden) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL