upload

package
v1.12.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrFileTypeForbidden

func IsErrFileTypeForbidden(err error) bool

IsErrFileTypeForbidden checks if an error is a ErrFileTypeForbidden.

func VerifyAllowedContentType

func VerifyAllowedContentType(buf []byte, allowedTypes []string) error

VerifyAllowedContentType validates 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