Home > Backend Development > PHP Tutorial > 七牛云存储base64的数据 如何上传?

七牛云存储base64的数据 如何上传?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:42:23
Original
1766 people have browsed it

七牛云存储base64的数据 如何上传?

回复内容:

七牛云存储base64的数据 如何上传?

请求包:

<code>POST /put/<fsize>/key/<encodedkey>/mimeType/<encodedmimetype>/crc32/<crc32>/x:user-var/<encodeduservarval>
Authorization: UpToken <uptoken>
Content-Type: application/octet-stream

<filecontent>
</filecontent></uptoken></encodeduservarval></crc32></encodedmimetype></encodedkey></fsize></code>
Copy after login

<code>POST /putb64/<fsize>/key/<encodedkey>/mimeType/<encodedmimetype>/crc32/<crc32>/x:user-var/<encodeduservarval>
Authorization: UpToken <uptoken>
Content-Type: application/octet-stream

<base64encodedfilecontent>
</base64encodedfilecontent></uptoken></encodeduservarval></crc32></encodedmimetype></encodedkey></fsize></code>
Copy after login
  • <fsize></fsize>: 文件大小,必选。未来也许可以支持传入 -1 表示文件大小以 http request body 为准。
  • <encodedkey></encodedkey>: 可选,如果没有指定则:如果 uptoken.SaveKey 存在则基于 SaveKey 生产 key,否则用 hash 值作 key。
  • <encodedmimetype></encodedmimetype>: 文件的 MIME 类型。可选,默认是 application/octet-stream。
  • <crc32></crc32>: 文件内容的 crc32 校验值。可选,不指定则不进行校验。

返回包:

<code>200 OK {
  hash: <etag>
}
</etag></code>
Copy after login

怎么都没有人回答啊

Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template