From 776966e22c89d8e42ffb6fe030b1ca3f3aeac079 Mon Sep 17 00:00:00 2001 From: Tim Gallant Date: Sat, 21 Mar 2020 14:50:17 -0700 Subject: [PATCH] opendrive: pass options to rest.Opts for Put and Update --- backend/opendrive/opendrive.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/backend/opendrive/opendrive.go b/backend/opendrive/opendrive.go index d5f41c817..3f8c05f83 100644 --- a/backend/opendrive/opendrive.go +++ b/backend/opendrive/opendrive.go @@ -687,8 +687,9 @@ func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options . Name: leaf, } opts := rest.Opts{ - Method: "POST", - Path: "/upload/create_file.json", + Method: "POST", + Options: options, + Path: "/upload/create_file.json", } resp, err = o.fs.srv.CallJSON(ctx, &opts, &createFileData, &response) return o.fs.shouldRetry(resp, err) @@ -970,8 +971,9 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op openUploadData := openUpload{SessionID: o.fs.session.SessionID, FileID: o.id, Size: size} // fs.Debugf(nil, "PreOpen: %#v", openUploadData) opts := rest.Opts{ - Method: "POST", - Path: "/upload/open_file_upload.json", + Method: "POST", + Options: options, + Path: "/upload/open_file_upload.json", } resp, err := o.fs.srv.CallJSON(ctx, &opts, &openUploadData, &openResponse) return o.fs.shouldRetry(resp, err)