Content-transfer-encoding: BASE64 BOX-API

2019-08-14 03:43发布

I would like to know if "Content-transfer-encoding: BASE64" used inside multipart HTTP POST request body is supported by BOX.

The problem I have is that I generated the following body:

-------boundary
Content-Disposition: form-data; name="filename"; filename="82b.gif"
Content-Type: image/gif
Content-Transfer-Encoding: BASE64

$base64_encoded_binary_file_content
-------boundary
Content-Disposition: form-data; name="parent_id"

123456789
-------boundary--

and sent the http request to https://upload.box.com/api/2.0/files/content.

The file can be created there, but it is not same as the original gif file. it is actually a text file whose content is a string of base64-encoded original gif file.

any suggestion will be very helpful.

Thank you.

标签: box-api
1条回答
2楼-- · 2019-08-14 04:22

We're looking to add support for Base64 encoding of files in the future, but do not currently support it.

查看更多
登录 后发表回答