onedrive: (business only) workaround to replace existing file on server-side copy (#4904)
This commit is contained in:
parent
dd67a3d5f5
commit
c66b901320
1 changed files with 2 additions and 1 deletions
|
@ -1063,7 +1063,8 @@ func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy the object
|
// Copy the object
|
||||||
opts := newOptsCall(srcObj.id, "POST", "/copy")
|
// The query param is a workaround for OneDrive Business for #4590
|
||||||
|
opts := newOptsCall(srcObj.id, "POST", "/copy?@microsoft.graph.conflictBehavior=replace")
|
||||||
opts.ExtraHeaders = map[string]string{"Prefer": "respond-async"}
|
opts.ExtraHeaders = map[string]string{"Prefer": "respond-async"}
|
||||||
opts.NoResponse = true
|
opts.NoResponse = true
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue