Documentation
¶
Index ¶
Constants ¶
View Source
const ( SizeErr = "upload size error" HashedErr = "file uploaded hash is different" RepeatingErr = "files repeating" BuffSize = 32 * 1024 )
SizeErr 使用 CheckSeekerMove(hash) 检查文件上传进度;切分后重新上传; HashedErr 上传完成后 校验哈希,哈希与前端不一致 RepeatingErr 上传名称已经存在;重新命名
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Default ¶
type Default struct { }
func (*Default) Store ¶
func (d *Default) Store(file *StorageFile) error
type Storage ¶
type Storage interface { Load(hash string) (StorageFile, error) Store(file *StorageFile) error }
type StorageFile ¶
func (StorageFile) Empty ¶
func (d StorageFile) Empty() bool
type Uploader ¶
type Uploader struct {
// contains filtered or unexported fields
}
func NewUploader ¶
func (*Uploader) NewStorage ¶
func (uploader *Uploader) NewStorage() storageStandard
func (*Uploader) SingleUpload ¶
func (uploader *Uploader) SingleUpload(file *multipart.File, header *multipart.FileHeader) singleStandard
Click to show internal directories.
Click to hide internal directories.