upload

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package upload is the http multipart upload package

Index

Constants

View Source
const (
	ErrInvalidFile    = errors.String("invalid file")
	ErrTargetIsNotDir = errors.String("target is not a directory")
	ErrSizeNotMatch   = io.ErrSizeNotMatch
)

Variables

This section is empty.

Functions

func FileUpload

func FileUpload(req *http.Request, path, name string) (fs.FileInfo, error)

FileUpload upload file

Types

type FileInfo

type FileInfo interface {
	fs.FileInfo
	ContentType() string
}

func ParseMultipart

func ParseMultipart(header *multipart.FileHeader) FileInfo

type Uploader

type Uploader interface {
	UploadFromMultipart(req *http.Request, name string) (fs.FileInfo, error)
}

Jump to

Keyboard shortcuts

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