Skip to content

Commit 9899793

Browse files
author
Diwaker Gupta
committed
Fix broken build for Paper.
Thanks @MrSaints for the PR (#24)!
1 parent 2810241 commit 9899793

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

dropbox/paper/client.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ func (dbx *apiImpl) DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res
182182
}
183183

184184
headers := map[string]string{
185-
"Content-Type": "application/octet-stream",
185+
"Content-Type": "application/octet-stream",
186+
"Dropbox-API-Arg": string(b),
186187
}
187188
if dbx.Config.AsMemberID != "" {
188189
headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
@@ -254,7 +255,7 @@ func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult
254255
}
255256

256257
headers := map[string]string{
257-
"Content-Type": "application/json",
258+
"Dropbox-API-Arg": string(b),
258259
}
259260
if dbx.Config.AsMemberID != "" {
260261
headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
@@ -888,7 +889,8 @@ func (dbx *apiImpl) DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res
888889
}
889890

890891
headers := map[string]string{
891-
"Content-Type": "application/octet-stream",
892+
"Content-Type": "application/octet-stream",
893+
"Dropbox-API-Arg": string(b),
892894
}
893895
if dbx.Config.AsMemberID != "" {
894896
headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID

dropbox/sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const (
3535
hostAPI = "api"
3636
hostContent = "content"
3737
hostNotify = "notify"
38-
sdkVersion = "2.1.0"
38+
sdkVersion = "1.0.0-beta"
3939
specVersion = "52ee619"
4040
)
4141

generator/go_client.stoneg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def _generate_request(self, namespace, route):
120120

121121
headers = {}
122122
if not is_void_type(route.arg_data_type):
123-
if host == 'content':
123+
if host == 'content' or style in ['upload', 'download']:
124124
headers["Dropbox-API-Arg"] = "string(b)"
125125
else:
126126
headers["Content-Type"] = '"application/json"'

0 commit comments

Comments
 (0)