sharefile: fix backend due to API swapping integers for strings

For some reason the API started returning some integers as strings in
JSON. This is probably OK in Javascript but it upsets Go.

This is easily fixed with the `json:"name,size"` struct tag.
This commit is contained in:
Nick Craig-Wood 2020-11-13 14:37:43 +00:00
parent 843d684568
commit 4df333255a

View File

@ -106,7 +106,7 @@ type UploadSpecification struct {
type UploadFinishResponse struct { type UploadFinishResponse struct {
Error bool `json:"error"` Error bool `json:"error"`
ErrorMessage string `json:"errorMessage"` ErrorMessage string `json:"errorMessage"`
ErrorCode int `json:"errorCode"` ErrorCode int `json:"errorCode,string"`
Value []struct { Value []struct {
UploadID string `json:"uploadid"` UploadID string `json:"uploadid"`
ParentID string `json:"parentid"` ParentID string `json:"parentid"`
@ -114,7 +114,7 @@ type UploadFinishResponse struct {
StreamID string `json:"streamid"` StreamID string `json:"streamid"`
FileName string `json:"filename"` FileName string `json:"filename"`
DisplayName string `json:"displayname"` DisplayName string `json:"displayname"`
Size int `json:"size"` Size int `json:"size,string"`
Md5 string `json:"md5"` Md5 string `json:"md5"`
} `json:"value"` } `json:"value"`
} }