IBM Bluemix CloudでObject Storage Serviceを使用しようとしていますが、nodejs サーバーから画像を送信できません。これどうやってするの?私のサーバーコードに従ってください:
unirest
.post(MY_CONTAINER + new_fname)
.headers({'Content-Type': 'multipart/form-data', 'X-Auth-Token': token})
.field({ 'max_file_count': 1 })
.field({ 'max_file_size': 1 })
.attach({ 'file': file.originalname, 'relative file': streamFile })
.end(function (resp) {
//response
console.log(resp.status);
console.log(resp.body);
});
主な問題は、API を使用して画像 (png または jpg) を bluemix ストレージに送信する正しい方法を見つけることです (既にサーバーにアップロード済みです)。