Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ReaderLen ¶
ReaderLen 实现 读 和 长度 接口
func NewFileReaderLen ¶
NewFileReaderLen 将 *os.File 文件对象实现 ReaderLen 接口
type UploadStatus ¶
UploadStatus 上传状态
type Uploader ¶
type Uploader struct { URL string // 上传地址 IsMultiPart bool // 是否表单上传 Body *reader // 要上传的对象 // contains filtered or unexported fields }
Uploader 上传
func NewUploader ¶
func NewUploader(url string, isMultipart bool, uploadReaderLen ReaderLen, h *requester.HTTPClient) (uploader *Uploader)
NewUploader 返回 uploader 对象, url: 上传地址, isMultipart: 是否表单上传,uploadReaderLen: 实现 uploader.ReaderLen 接口的对象, 例如文件
func (*Uploader) GetStatusChan ¶
func (u *Uploader) GetStatusChan() <-chan UploadStatus
GetStatusChan 返回 UploadStatus 对象的 channel
Click to show internal directories.
Click to hide internal directories.