🚧 check upload file

This commit is contained in:
微凉
2021-12-31 14:05:35 +08:00
parent 6f0959a98e
commit 939c9cd5ac
12 changed files with 60 additions and 13 deletions

View File

@ -227,6 +227,9 @@ func (driver Shandian) Delete(path string, account *model.Account) error {
}
func (driver Shandian) Upload(file *model.FileStream, account *model.Account) error {
if file == nil {
return base.ErrEmptyFile
}
parentFile, err := driver.File(file.ParentPath, account)
if err != nil {
return err