From 645cf5ec0fa379cdc21fd9a5673bd41210ae7fa0 Mon Sep 17 00:00:00 2001 From: Oliver Heyme Date: Fri, 16 Mar 2018 20:18:51 +0100 Subject: [PATCH] onedrive: fix wrong upload endpoint and createDate #1716 This fixes the problem introduced by 7f744033d8eae0fa916c3207e05cf56d7708fd09 --- backend/onedrive/onedrive.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/onedrive/onedrive.go b/backend/onedrive/onedrive.go index 9aacd9c27..4f9805f4d 100644 --- a/backend/onedrive/onedrive.go +++ b/backend/onedrive/onedrive.go @@ -1098,9 +1098,10 @@ func (o *Object) Open(options ...fs.OpenOption) (in io.ReadCloser, err error) { func (o *Object) createUploadSession(modTime time.Time) (response *api.CreateUploadResponse, err error) { opts := rest.Opts{ Method: "POST", - Path: "/root:/" + rest.URLPathEscape(o.srvPath()) + ":/createUploadSession", + Path: "/root:/" + rest.URLPathEscape(o.srvPath()) + ":/upload.createSession", } createRequest := api.CreateUploadRequest{} + createRequest.Item.FileSystemInfo.CreatedDateTime = api.Timestamp(modTime) createRequest.Item.FileSystemInfo.LastModifiedDateTime = api.Timestamp(modTime) var resp *http.Response err = o.fs.pacer.Call(func() (bool, error) {