mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-21 20:18:47 +08:00
chore: add is it support upload config for driver
This commit is contained in:
parent
31ff31d3dd
commit
a61bb6ab1f
@ -7,4 +7,5 @@ type Config struct {
|
||||
OnlyProxy bool
|
||||
NoNeedSetLink bool
|
||||
NoCache bool
|
||||
NoUpload bool
|
||||
}
|
||||
|
@ -15,6 +15,9 @@ var UploadTaskManager = task.NewTaskManager()
|
||||
// Put add as a put task
|
||||
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")
|
||||
}
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "failed get account")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user