Lint
This commit is contained in:
parent
fb8163193c
commit
c7c652825b
|
@ -57,8 +57,8 @@
|
||||||
<DrawerBindableInput
|
<DrawerBindableInput
|
||||||
title="File name"
|
title="File name"
|
||||||
{bindings}
|
{bindings}
|
||||||
value={parameters.file_name}
|
value={parameters.fileName}
|
||||||
on:change={value => (parameters.file_name = value.detail)}
|
on:change={value => (parameters.fileName = value.detail)}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -402,11 +402,11 @@ const closeSidePanelHandler = () => {
|
||||||
|
|
||||||
const downloadFileHandler = async (action, _context) => {
|
const downloadFileHandler = async (action, _context) => {
|
||||||
try {
|
try {
|
||||||
let { url, file_name, type, attachment } = action.parameters
|
let { url, fileName, type, attachment } = action.parameters
|
||||||
if (type === "attachment") {
|
if (type === "attachment") {
|
||||||
const attachmentObject = JSON.parse(attachment)
|
const attachmentObject = JSON.parse(attachment)
|
||||||
url = attachmentObject.url
|
url = attachmentObject.url
|
||||||
file_name = attachmentObject.name
|
fileName = attachmentObject.name
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await fetch(url)
|
const response = await fetch(url)
|
||||||
|
@ -419,7 +419,7 @@ const downloadFileHandler = async (action, _context) => {
|
||||||
|
|
||||||
const link = document.createElement("a")
|
const link = document.createElement("a")
|
||||||
link.href = objectUrl
|
link.href = objectUrl
|
||||||
link.download = file_name
|
link.download = fileName
|
||||||
link.click()
|
link.click()
|
||||||
|
|
||||||
URL.revokeObjectURL(objectUrl)
|
URL.revokeObjectURL(objectUrl)
|
||||||
|
|
Loading…
Reference in New Issue