|
|
@@ -605,13 +605,13 @@ function saveToClipboard(pageData) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-async function saveToRestFormApi(taskId, content, url, token, restApiUrl, fileFieldName, urlFieldName) {
|
|
|
+async function saveToRestFormApi(taskId, filename, content, url, token, restApiUrl, fileFieldName, urlFieldName) {
|
|
|
try {
|
|
|
const taskInfo = business.getTaskInfo(taskId);
|
|
|
if (!taskInfo || !taskInfo.cancelled) {
|
|
|
const client = new RestFormApi(token, restApiUrl, fileFieldName, urlFieldName);
|
|
|
business.setCancelCallback(taskId, () => client.abort());
|
|
|
- return await client.upload(content, url);
|
|
|
+ return await client.upload(filename, content, url);
|
|
|
}
|
|
|
} catch (error) {
|
|
|
throw new Error(error.message + " (RestFormApi)");
|