Documentation ¶
Index ¶
- func WithBucket(bucket string) option
- func WithChunkSize(chunkSize int) option
- func WithDebug(debug bool) option
- func WithFilePath(filePath string) option
- func WithFilePathAndFileName(filePath, fileName string) option
- func WithImgUrl(imgUrl string) option
- func WithIsDelLocal(isDelLocal bool) option
- func WithKey(accessKey, secretKey string) option
- func WithServerPath(serverPath string) option
- func WithUseCdnDomains(useCdnDomains bool) option
- func WithUseHTTPS(useHTTPS bool) option
- func WithZone(zone *storage.Zone) option
- type File
- func (f *File) DeleteFile(fileName string) error
- func (f *File) SetFileName(fileName string)
- func (f *File) SetFilePath(filePath string)
- func (f *File) SplitUpload(file multipart.File, fileHeader *multipart.FileHeader) (string, error)
- func (f *File) UploadFile(file multipart.File, fileHeader *multipart.FileHeader) (string, error)
- func (f *File) UploadFileByPath() (string, error)
- func (f *File) UploadLocalFile(filePath, fileName string) (string, error)
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 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 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
Types ¶
type File ¶
type File struct { qiniux.Qiniu Bucket string // 空间名 ImgUrl string // cdn域名 ServerPath string // 服务器文件路径 // contains filtered or unexported fields }
func (*File) DeleteFile ¶ added in v0.9.7
DeleteFile 删除文件
func (*File) SetFileName ¶
func (*File) SetFilePath ¶
func (*File) SplitUpload ¶ added in v0.9.7
SplitUploadFile 上传文件(网络请求)
func (*File) UploadFile ¶
UploadFile 上传文件(网络请求)
func (*File) UploadFileByPath ¶ added in v0.9.7
UploadFileByPath 上传文件(本地文件)
Click to show internal directories.
Click to hide internal directories.