Hi,
I’m trying to upload file to DMS service in SSD API.
What’s the proper configuration for Http Request node to send the multipart/form-data ?
I tried to send the file in various ways, but I’m constantly getting 400.
bh.local.url = `${process.env.DMS_URL}/file/create`;
bh.local.headers = {
"Content-Type": " multipart/form-data"
};
bh.local.body = {
file: bh.input.files.file[0]
};
and this doesn’t work as well
bh.local.url = `${process.env.DMS_URL}/file/create`;
bh.local.headers = {
"Content-Type": " multipart/form-data"
};
const fd = new FormData();
fd.append(
"file",
bh.input.files.file,
);
fd.append("relativePath", "");
fd.append(
"properties",
JSON.stringify({
title: "string",
description: "string"
})
);
fd.append(
"options",
JSON.stringify({
autoRename: false,
majorVersion: false,
versioningEnabled: false
})
);
bh.local.headers = {
"Authorization": bh.local.token
};
bh.local.body = fd;
console.log('Body', bh.local.body)
