file

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBucket

func WithBucket(bucket string) option

func WithChunkSize added in v0.7.6

func WithChunkSize(chunkSize int) option

func WithDebug added in v0.7.6

func WithDebug(debug bool) option

func WithFilePath

func WithFilePath(filePath string) option

func WithImgUrl

func WithImgUrl(imgUrl string) option

func WithIsDelLocal

func WithIsDelLocal(isDelLocal bool) option

func WithKey

func WithKey(accessKey, secretKey string) option

func WithServerPath added in v0.6.3

func WithServerPath(serverPath string) option

func WithUseCdnDomains added in v0.7.6

func WithUseCdnDomains(useCdnDomains bool) option

func WithUseHTTPS added in v0.7.6

func WithUseHTTPS(useHTTPS bool) option

func WithZone

func WithZone(zone *storage.Zone) option

Types

type File

type File struct {
	qiniux.Qiniu
	Bucket     string // 空间名
	ImgUrl     string // cdn域名
	ServerPath string // 服务器文件路径
	// contains filtered or unexported fields
}

func NewFile added in v0.5.1

func NewFile(opts ...option) *File

func (*File) SetFileName

func (f *File) SetFileName(fileName string)

func (*File) SetFilePath

func (f *File) SetFilePath(filePath string)

func (*File) UploadFile

func (f *File) UploadFile(file multipart.File, fileHeader *multipart.FileHeader) (string, error)

Jump to

Keyboard shortcuts

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