This commit is contained in:
Adria Navarro 2024-03-27 12:57:20 +01:00
parent fb8163193c
commit c7c652825b
2 changed files with 5 additions and 5 deletions

View File

@ -57,8 +57,8 @@
<DrawerBindableInput
title="File name"
{bindings}
value={parameters.file_name}
on:change={value => (parameters.file_name = value.detail)}
value={parameters.fileName}
on:change={value => (parameters.fileName = value.detail)}
/>
{/if}
</div>

View File

@ -402,11 +402,11 @@ const closeSidePanelHandler = () => {
const downloadFileHandler = async (action, _context) => {
try {
let { url, file_name, type, attachment } = action.parameters
let { url, fileName, type, attachment } = action.parameters
if (type === "attachment") {
const attachmentObject = JSON.parse(attachment)
url = attachmentObject.url
file_name = attachmentObject.name
fileName = attachmentObject.name
}
const response = await fetch(url)
@ -419,7 +419,7 @@ const downloadFileHandler = async (action, _context) => {
const link = document.createElement("a")
link.href = objectUrl
link.download = file_name
link.download = fileName
link.click()
URL.revokeObjectURL(objectUrl)