Documentation ¶
Index ¶
- Constants
- type FileHeader
- type FileStream
- func (file *FileStream) Close() error
- func (file *FileStream) Info() *UploadTaskInfo
- func (file *FileStream) Read(p []byte) (n int, err error)
- func (file *FileStream) RetFileStream() *FileStream
- func (file *FileStream) Seek(offset int64, whence int) (int64, error)
- func (file *FileStream) Seekable() bool
- func (file *FileStream) SetModel(fileModel interface{})
- func (file *FileStream) SetSize(size uint64)
- type UploadTaskInfo
- type WriteMode
Constants ¶
View Source
const ( // GinCtx Gin的上下文 GinCtx key = iota // PathCtx 文件或目录的虚拟路径 PathCtx // FileModelCtx 文件数据库模型 FileModelCtx // FolderModelCtx 目录数据库模型 FolderModelCtx // HTTPCtx HTTP请求的上下文 HTTPCtx // UploadPolicyCtx 上传策略,一般为slave模式下使用 UploadPolicyCtx // UserCtx 用户 UserCtx // ThumbSizeCtx 缩略图尺寸 ThumbSizeCtx // FileSizeCtx 文件大小 FileSizeCtx ShareKeyCtx // LimitParentCtx 限制父目录 LimitParentCtx // IgnoreDirectoryConflictCtx 忽略目录重名冲突 IgnoreDirectoryConflictCtx // RetryCtx 失败重试次数 RetryCtx // ForceUsePublicEndpointCtx 强制使用公网 Endpoint ForceUsePublicEndpointCtx // CancelFuncCtx Context 取消函數 CancelFuncCtx // 文件在从机节点中的路径 SlaveSrcPath )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileHeader ¶
type FileHeader interface { io.Reader io.Closer io.Seeker Info() *UploadTaskInfo SetSize(uint64) SetModel(fileModel interface{}) Seekable() bool RetFileStream() *FileStream }
FileHeader 上传来的文件数据处理器
type FileStream ¶
type FileStream struct { Mode WriteMode LastModified *time.Time Metadata map[string]string File io.ReadCloser Seeker io.Seeker Size uint64 VirtualPath string Name string MIMEType string SavePath string UploadSessionID *string AppendStart uint64 Model interface{} Src string EncodePath string Md5 string Fileid int64 FolderId int64 FileUuid string }
FileStream 用户传来的文件
func (*FileStream) Close ¶
func (file *FileStream) Close() error
func (*FileStream) Info ¶
func (file *FileStream) Info() *UploadTaskInfo
func (*FileStream) RetFileStream ¶ added in v1.4.21
func (file *FileStream) RetFileStream() *FileStream
func (*FileStream) Seekable ¶
func (file *FileStream) Seekable() bool
func (*FileStream) SetModel ¶
func (file *FileStream) SetModel(fileModel interface{})
func (*FileStream) SetSize ¶
func (file *FileStream) SetSize(size uint64)
type UploadTaskInfo ¶
type UploadTaskInfo struct { Size uint64 MIMEType string FileName string VirtualPath string Mode WriteMode Metadata map[string]string LastModified *time.Time SavePath string UploadSessionID *string AppendStart uint64 Model interface{} Src string EncodePath string Md5 string Fileid uint FolderId uint }
Click to show internal directories.
Click to hide internal directories.