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