file

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 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 WithFilePathAndFileName added in v0.9.7

func WithFilePathAndFileName(filePath, fileName 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) DeleteFile added in v0.9.7

func (f *File) DeleteFile(fileName string) error

DeleteFile 删除文件

func (*File) SetFileName

func (f *File) SetFileName(fileName string)

func (*File) SetFilePath

func (f *File) SetFilePath(filePath string)

func (*File) SplitUpload added in v0.9.7

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

SplitUploadFile 上传文件(网络请求)

func (*File) UploadFile

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

UploadFile 上传文件(网络请求)

func (*File) UploadFileByPath added in v0.9.7

func (f *File) UploadFileByPath() (string, error)

UploadFileByPath 上传文件(本地文件)

func (*File) UploadLocalFile added in v0.10.3

func (f *File) UploadLocalFile(filePath, fileName string) (string, error)

Jump to

Keyboard shortcuts

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