Fixed file upload problems for apps due to headers being auto-set

This commit is contained in:
frikky
2022-08-09 15:03:19 +02:00
parent 478e6e623c
commit 2d696e3dea
3 changed files with 79 additions and 48 deletions
+11 -2
View File
@@ -1306,7 +1306,15 @@ const ParsedAction = (props) => {
if (data.name.toLowerCase() === "headers") {
console.log("Should show headers field instead with + and -!")
data.value = data.example
// Check if file ID exists
//
const fileFound = selectedActionParameters.find(param => param.name === "file_id")
if (fileFound === undefined || fileFound === null) {
data.value = data.example
} else {
// Purposely unset it if set by default when using files
data.value = ""
}
}
}
@@ -3115,8 +3123,9 @@ const ParsedAction = (props) => {
}
}
console.log("DID REPLACE ACTUALLY WORK?? - Something is buggy.");
console.log("DID NAME REPLACE ACTUALLY WORK? - may be missing it in certain triggers");
setWorkflow(workflow);
setUpdate(Math.random());
baselabel = name
}}
/>