Documentation ¶
Index ¶
- Variables
- func BuildSign(endpoint, bucketName, obj, filename string) (url string, err error)
- func GetVersion() (version string)
- func Listfile(maker, endpoint, prefix, bucketName string, num int) (data oss.ListObjectsResult, err error)
- func NewOss(endpoint string) (client *oss.Client, err error)
- func PutObjectSrc(endpoint, objectName, bucketName, contxttStr string) (err error)
- func ReadToBoundary(boundary []byte, stream io.ReadCloser, target io.WriteCloser) ([]byte, bool, error)
- func SaveFile(fileName, uploaddir string, fileReader multipart.File) (objectName string, err error)
- func SaveFileMd5ByFileReader(f *multipart.FileHeader) (md5Str, LocalfilePath string, err error)
- func SetObjectMeta(endpoint, bucketName, obj, filename string)
- func UploadAvatarFile(endpoint, fileName, bucketName, uploaddir string) (resultfile string, err error)
- func UploadFile(endpoint string, fileName, md5, localFilePath string, bucketname string) (file string, err error)
- func UploadFileSrc(endpoint, fileName, bucketName, md5, LocalFilePath string) (resultfile string, err error)
- func UploadLocalFile(endpoint, fileName, bucketName, uploaddir string) (resultfile string, err error)
- type FileHeader
- type OssProgressListener
Constants ¶
This section is empty.
Variables ¶
View Source
var PrivateExt = ",ts,"
Functions ¶
func GetVersion ¶
func GetVersion() (version string)
func Listfile ¶
func Listfile(maker, endpoint, prefix, bucketName string, num int) (data oss.ListObjectsResult, err error)
func PutObjectSrc ¶
func ReadToBoundary ¶
func ReadToBoundary(boundary []byte, stream io.ReadCloser, target io.WriteCloser) ([]byte, bool, error)
/ 从流中一直读到文件的末位 / @return []byte 没有写到文件且又属于下一个文件的数据 / @return bool 是否已经读到流的末位了 / @return error 是否发生错误
func SaveFileMd5ByFileReader ¶
func SaveFileMd5ByFileReader(f *multipart.FileHeader) (md5Str, LocalfilePath string, err error)
func SetObjectMeta ¶
func SetObjectMeta(endpoint, bucketName, obj, filename string)
func UploadAvatarFile ¶
func UploadFile ¶
func UploadFileSrc ¶
func UploadLocalFile ¶
Types ¶
type FileHeader ¶
type FileHeader struct { ContentDisposition string Name string FileName string ///< 文件名 ContentType string ContentLength int64 }
/ 解析多个文件上传中,每个具体的文件的信息
func ParseFileHeader ¶
func ParseFileHeader(h []byte) (FileHeader, bool)
/ 解析描述文件信息的头部 / @return FileHeader 文件名等信息的结构体 / @return bool 解析成功还是失败
type OssProgressListener ¶
type OssProgressListener struct { }
定义进度条监听器。
func (*OssProgressListener) ProgressChanged ¶
func (listener *OssProgressListener) ProgressChanged(event *oss.ProgressEvent)
定义进度变更事件处理函数。
Click to show internal directories.
Click to hide internal directories.