aleph-sdk-ts
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -17,3 +17,2 @@ "use strict"; | ||
const sha_js_1 = __importDefault(require("sha.js")); | ||
const form_data_1 = __importDefault(require("form-data")); | ||
const axios_1 = __importDefault(require("axios")); | ||
@@ -56,9 +55,5 @@ function PutContentToStorageEngine(configuration) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const form = new form_data_1.default(); | ||
const form = new FormData(); | ||
form.append('file', configuration.file); | ||
const response = yield axios_1.default.post(`${configuration.APIServer}/api/v0/${configuration.storageEngine.toLowerCase()}/add_file`, form, { | ||
headers: { | ||
'Content-Type': `multipart/form-data`, | ||
}, | ||
}); | ||
const response = yield axios_1.default.post(`${configuration.APIServer}/api/v0/${configuration.storageEngine.toLowerCase()}/add_file`, form); | ||
return response.data.hash; | ||
@@ -65,0 +60,0 @@ }); |
{ | ||
"name": "aleph-sdk-ts", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Aleph.im Typescript SDK", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
31940
757