chore: aria2 related function

This commit is contained in:
Noah Hsu
2022-06-20 20:34:58 +08:00
parent 4db25605e7
commit 6c552a9d62
9 changed files with 120 additions and 2 deletions

View File

@ -16,7 +16,7 @@ var UploadTaskManager = task.NewTaskManager()
func Put(ctx context.Context, account driver.Driver, parentPath string, file model.FileStreamer) error {
account, actualParentPath, err := operations.GetAccountAndActualPath(parentPath)
if account.Config().NoUpload {
return errors.New("upload is not supported")
return errors.WithStack(ErrUploadNotSupported)
}
if err != nil {
return errors.WithMessage(err, "failed get account")