gitea: code.gitea.io/gitea/modules/upload Index | Files

package upload

import "code.gitea.io/gitea/modules/upload"

Index

Package Files

upload.go

func AddUploadContext Uses

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

AddUploadContext renders template values for dropzone

func IsErrFileTypeForbidden Uses

func IsErrFileTypeForbidden(err error) bool

IsErrFileTypeForbidden checks if an error is a ErrFileTypeForbidden.

func Verify Uses

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

Verify validates whether a file is allowed to be uploaded.

type ErrFileTypeForbidden Uses

type ErrFileTypeForbidden struct {
    Type string
}

ErrFileTypeForbidden not allowed file type error

func (ErrFileTypeForbidden) Error Uses

func (err ErrFileTypeForbidden) Error() string

Package upload imports 7 packages (graph) and is imported by 7 packages. Updated 2021-01-22. Refresh now. Tools for package owners.