This commit is contained in:
@ -14,8 +14,9 @@ var (
|
||||
MoveBetweenTwoStorages = errors.New("can't move files between two storages, try to copy")
|
||||
UploadNotSupported = errors.New("upload not supported")
|
||||
|
||||
MetaNotFound = errors.New("meta not found")
|
||||
StorageNotFound = errors.New("storage not found")
|
||||
MetaNotFound = errors.New("meta not found")
|
||||
StorageNotFound = errors.New("storage not found")
|
||||
StreamIncomplete = errors.New("upload/download stream incomplete, possible network issue")
|
||||
)
|
||||
|
||||
// NewErr wrap constant error with an extra message
|
||||
|
@ -27,7 +27,7 @@ func putAsTask(dstDirPath string, file *model.FileStream) error {
|
||||
return errors.WithStack(errs.UploadNotSupported)
|
||||
}
|
||||
if file.NeedStore() {
|
||||
tempFile, err := utils.CreateTempFile(file)
|
||||
tempFile, err := utils.CreateTempFile(file, file.GetSize())
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to create temp file")
|
||||
}
|
||||
|
Reference in New Issue
Block a user