开发者

Apex HTTP PUT with Binary Data

开发者 https://www.devze.com 2023-03-16 17:44 出处:网络
开发者_开发技巧I am trying to submit a binary file (Word doc) using HTTP/PUT, however it seems like the encoding is not properly done and it is not sending binary data, it works ok if I just send txt
开发者_开发技巧

I am trying to submit a binary file (Word doc) using HTTP/PUT, however it seems like the encoding is not properly done and it is not sending binary data, it works ok if I just send txt files...

Any way to make the data to be binary instead of encoded like strings?


EncodingUtil.base64Encode(theWordDocBlob);

Assuming your word doc is a Blob in Apex, the above will work.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号