0
我試圖使用Filepicker API和request.js模塊將文件上傳到S3。分段上傳後文件內容不正確
content = "ABCDEF"
options =
url: 'https://www.filepicker.io/api/store/S3'
preambleCRLF: true # tried also with false
postambleCRLF: true # tried also with false
qs:
key: 'XXX'
store: 'S3'
mimetype: 'text/csv'
path: 'some-path.csv'
container: 'my-bucket'
access: 'public'
multipart: [
{
body: content
}
]
method: 'post'
request options, (err, res, body) ->
# 200 OK
它通常工作然而上傳的文件內容是這樣的:
--6f63ec28-40de-425c-86d5-36f0befcec4a
ABCDEF
--6f63ec28-40de-425c-86d5-36f0befcec4a--
我在做什麼錯?