You are on page 1of 10

:1.1.

UPS
1. key

GET

/ups/gk?sha1=[sha1]&filename=[filename]&filesize=[filesize]&key=[key]

sha1 : sha1
filename : ()
filesize : ()
key : key
(gk del key coup fin key )

<?xml version="1.0" encoding="utf-8"?>


<ups>
<cmd>gk</cmd>
<status>[status]</status>
<key>[key]</key>
</ups>

[status] :
100 :
101 : key
102 :
103 :
104 :
105 :

[key] : key

2.

GET

/ups/co?sha1=[sha1]&filename=[filename]&filesize=[filesize]&key=[key]

sha1 : sha1
filename : ()
filesize :
key : gk key

<?xml version="1.0" encoding="utf-8"?>


<ups>
<cmd>co</cmd>
<data_type>[data_type]</data_type>
<data>[data]</data>
</ups>

[data_type] : 0 , 1
[data] :

3.

POST

/ups/up?sha1=[sha1]&filename=[filename]&filesize=[filesize]&key=[key]

sha1 : sha1
filename : ()
filesize :
key : gk key

:
U_BlockSchema :
U_Offset :
Filedata :
:
POST /ups/up?sha1=[...]&filename=54C8BEA2D6&filesize=24&key=[...] HTTP/1.1
Content-Type: multipart/form-data; boundary=--------UpsClient.Package.1311045700.7844
Content-Length: 435
Connection: Keep-Alive
Cache-Control: no-cache

----------UpsClient.Package.1311045700.7844
Content-Disposition: form-data; name="U_BlockSchema"

0
----------UpsClient.Package.1311045700.7844
Content-Disposition: form-data; name="U_Offset"

0
----------UpsClient.Package.1311045700.7844
Content-Disposition: form-data; name="Filedata"; filename="54C8BEA2D6"
Content-Type: application/octet-stream

sfdasfda
sf
saf
as
fa
s

----------UpsClient.Package.1311045700.7844-

<?xml version="1.0" encoding="utf-8"?>

<ups>
<cmd>up</cmd>
<status>[status]</status>
</ups>

[status] :
100
101

4.

GET

/ups/fin?sha1=[sha1]&filename=[filename]&filesize=[filesize]&key=[key]

sha1 : sha1
filename : ()
filesize : filesize
key : gk key

<?xml version="1.0" encoding="utf-8"?>


<ups>
<cmd>fin</cmd>
<status>[status]</status>
<data>[data]</data>
</ups>

[status] :
100
101

[data] : ( 0)

5.

GET

/ups/del?sha1=[sha1]&filename=[filename]&filesize=[filesize]&key=[key]

sha1 : sha1
filename : ()
key : key

<?xml version="1.0" encoding="utf-8"?>


<ups>
<cmd>del</cmd>
<status>[status]</status>
</ups>

[status] :
100
101
102


6.

GET

http://lb.u.demo.115.com/?
cmd=upload&
md115=[md115]&
sha1=[sha1]&
filename=[filename]&

filesize=[filesize]&
aid=[aid]&
cid=[cid]&
isp=[isp]&
cookie=[cookie]&
path=[path]

sha1 : sha1
filename :
filesize : ()
aid : aid
cid : cid
isp : or [0 1 ]
cookie : cookie
path : ()
:
path ,
folder
/folder/a.txt
/folder/folder_1/b.txt
/folder/folder_1/folder_2/c.txt

a.txt path=folder
b.txt path=folder/folder_1
c.txt path=folder/folder_1/folder_2

<?xml version="1.0" encoding="utf-8"?>


<root>
<cmd>upload</cmd>
<status>[status]</status>
<status_msg>[status]</status_msg>
<is_need_upload>[is_need_upload]</is_need_upload>
<pickcode>[pickcode]</pickcode>
<ip>[ip]</ip>

<port>[port]</port>
<key>[key]</key>
</root>

[status] : 100 [ , ]
[status_msg] :
[is_need_upload] : 0 1
[key] : coupfin key
[ip] : IP
[port] :
[key] : key

7.

GET

http://lb.u.demo.115.com/?
cmd=reupload&
md115=[md115]&
sha1=[sha1]&
filename=[filename]&
filesize=[filesize]&
cookie=[cookie]&
pickcode=[pickcode]

sha1 : sha1
filename :
filesize : ()
cookie : cookie
pickcode:

<?xml version="1.0" encoding="utf-8"?>


<root>
<cmd>reupload</cmd>
<status>[status]</status>
<status_msg>[status_msg]</status_msg>

<is_need_upload>[is_need_upload]</is_need_upload>
<pick_code>[pickcode]</pick_code>
<ip>[ip]</ip>
<port>[port]</port>
<key>[key]</key>
</root>

[status] : 100 [ , ]
[status_msg] :
[key] : coupfin key
[ip] : IP
[port] :
[key] : key

8.

GET

http://lb.u.demo.115.com/?cmd=delete&pickcode=[pickcode]&
cookie=[cookie]

cookie : cookie
pickcode:

<?xml version="1.0" encoding="utf-8"?>


<root>
<cmd>delete</cmd>
<status>[status]</status>
<status_msg>[status_msg]</status_msg>
</root>

[status] : 100
: , status_msg .

9.

GET

http://lb.u.demo.115.com/?cmd=add_dir&aid=[aid]&cid=[cid]
cookie=[cookie]

cookie : cookie
aid : aid
cid : cid
path : ()
:
path ,
folder
/folder
/folder/folder_1
/folder/folder_1/folder_2

a.txt path=folder
b.txt path=folder/folder_1
c.txt path=folder/folder_1/folder_2

<?xml version="1.0" encoding="utf-8"?>


<root>
<cmd>add_dir</cmd>
<status>[status]</status>
<status_msg>[status_msg]</status_msg>
</root>

[status] : 100
: , status_msg

md115
(1)
(1) (txt,doc,xls)

(2)

sha1 + md115

(2)

25KB

sha1

25kb 64MB

sha1 + md115

64MB

md115

(3)
UPS sha1 md115
md115 sha1
sha1=[md115_value]
/ups/co?sha1=[md115_value]&filename=[filename]&filesize=[filesize]&key=[key]