1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

Compare commits

...

1 Commits

Author SHA1 Message Date
Nick Craig-Wood
75ef84fdf6 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
2024-07-14 15:13:01 +01:00

View File

@@ -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