mirror of
https://github.com/rclone/rclone.git
synced 2024-12-22 15:11:56 +01:00
onedrive: fix --onedrive-av-override
The AVOverride=1 parameter doesn't always seem to work. The browser sends avcmd=1 though, so send that as well. Since this flag isn't documented anywhere this is a guess as to the correct behaviour. Fixes #7934
This commit is contained in:
parent
754e53dbcc
commit
75ef84fdf6
@ -2270,7 +2270,8 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.Read
|
||||
opts := o.fs.newOptsCall(o.id, "GET", "/content")
|
||||
opts.Options = options
|
||||
if o.fs.opt.AVOverride {
|
||||
opts.Parameters = url.Values{"AVOverride": {"1"}}
|
||||
// AVOverride=1 works normally but the browser sends avcmd=1
|
||||
opts.Parameters = url.Values{"AVOverride": {"1"}, "avcmd": {"1"}}
|
||||
}
|
||||
// Make a note of the redirect target as we need to call it without Auth
|
||||
var redirectReq *http.Request
|
||||
|
Loading…
Reference in New Issue
Block a user