我有一个从echosign获得的pdf缓冲区,我已经转换为base64编码数据。我想将该pdf上传到S3。我是否需要使用atob将其转换回pdf? (当我使用atob npm包时),上传的pdf变得受密码保护(损坏)。
我应该怎么做?我正在使用请求模块。当我收到签名文档时,它无法加载我猜它没有正确上传。我该怎么办?我正在使用以下代码。
options =
url: #mysignedurl
method: 'PUT'
headers:
'content-type': 'application/pdf'
'x-amz-acl': 'public-read'
'content-length': pdf.length
body: pdf #pdf is my buffer recieved from echosign
rpp = Async.runSync((done) ->
request(options, (Err, httpResponse, res) ->
done(null, resp)
)
)