更新分片上传初始化返回
This commit is contained in:
parent
4a37a5aa14
commit
f272d5f199
@ -1,6 +1,7 @@
|
|||||||
package oss
|
package oss
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
@ -45,6 +46,7 @@ func TestCreateInitMultipartUpload(t *testing.T) {
|
|||||||
req.Filepath = "test.jpg"
|
req.Filepath = "test.jpg"
|
||||||
req.TargetType = "oss"
|
req.TargetType = "oss"
|
||||||
req.TargetName = "image"
|
req.TargetName = "image"
|
||||||
|
req.FileHash = "51c68615b8d21f9b72b02f48c400cb87"
|
||||||
client, err := NewClient()
|
client, err := NewClient()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
@ -55,7 +57,11 @@ func TestCreateInitMultipartUpload(t *testing.T) {
|
|||||||
t.Error(err)
|
t.Error(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
t.Log(resp)
|
r, err := json.Marshal(resp)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
t.Log(string(r))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestClient_GetApkVersion(t *testing.T) {
|
func TestClient_GetApkVersion(t *testing.T) {
|
||||||
|
@ -29,6 +29,10 @@ type InitMultipartUploadResponse struct {
|
|||||||
FileUploaded bool `json:"file_uploaded"`
|
FileUploaded bool `json:"file_uploaded"`
|
||||||
UploadId string `json:"upload_id,omitempty"`
|
UploadId string `json:"upload_id,omitempty"`
|
||||||
Links []Link `json:"links,omitempty"`
|
Links []Link `json:"links,omitempty"`
|
||||||
|
Hash string `json:"hash,omitempty"`
|
||||||
|
Url string `json:"url,omitempty"`
|
||||||
|
Filepath string `json:"filepath,omitempty"`
|
||||||
|
FileName string `json:"filename,omitempty"`
|
||||||
} `json:"data"`
|
} `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user