h2non / node-bintray

CLI and programmatic interface for Bintray built for node.js
https://bintray.com
MIT License
5 stars 5 forks source link

uploaded files get corrupted #5

Open mohamedkomalo opened 8 years ago

mohamedkomalo commented 8 years ago

I am using grunt-bintray-deploy which uses this module to upload files to bintray, however the files that get uploaded to bintray have extra string at the beginning

--48940923NODERESLTER3890457293
Content-Disposition: form-data; name="package[message]"

Package upload: smw-web (0.1.0)
--48940923NODERESLTER3890457293
Content-Disposition: form-data; name="package[file]"; filename="smw-web-0.1.0.zip"
Content-Length: 1127530
Content-Type: application/octet-stream

there was an issue about uploading files to bintray that maybe related, the workaround they did was to not use multipart upload and post the binary data in the HTTP body https://github.com/SamDecrock/node-httpreq/issues/13

tabareh commented 7 years ago

This simple issue is making whole the library useless. could you fix it asap? it shouldn't be very complicated

h2non commented 7 years ago

You should be able to bypass the issue by explicitly passing the multipart: false option to Bintray client.

It uses restler behind the hood, which can change this behavior. See: https://github.com/danwrong/restler#options