diff --git a/packages/builder/package.json b/packages/builder/package.json index ad660d1f0e..ea555007a9 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -77,7 +77,6 @@ "mustache": "^4.0.1", "posthog-js": "1.3.1", "shortid": "^2.2.15", - "svelte-filepond": "^0.0.1", "svelte-loading-spinners": "^0.1.1", "svelte-portal": "^0.1.0", "svelte-simple-modal": "^0.4.2", diff --git a/packages/builder/src/builderStore/api.js b/packages/builder/src/builderStore/api.js index 46ae7457f1..a33a695028 100644 --- a/packages/builder/src/builderStore/api.js +++ b/packages/builder/src/builderStore/api.js @@ -1,6 +1,6 @@ const apiCall = method => async ( - url, - body, + url, + body, headers = { "Content-Type": "application/json" } ) => { const response = await fetch(url, { diff --git a/packages/builder/src/components/common/Dropzone.svelte b/packages/builder/src/components/common/Dropzone.svelte index b3c9338270..58c4bbd678 100644 --- a/packages/builder/src/components/common/Dropzone.svelte +++ b/packages/builder/src/components/common/Dropzone.svelte @@ -36,9 +36,12 @@ } async function removeFile() { - const response = await api.delete(`/api/attachments/${selectedImage.fileName}`) + const response = await api.delete( + `/api/attachments/${selectedImage.fileName}` + ) files.splice(selectedImageIdx, 1) files = files + selectedImageIdx = 0 } function navigateLeft() { diff --git a/packages/builder/src/components/common/Spinner.svelte b/packages/builder/src/components/common/Spinner.svelte index 01199e72ec..c719724fd8 100644 --- a/packages/builder/src/components/common/Spinner.svelte +++ b/packages/builder/src/components/common/Spinner.svelte @@ -1,6 +1,6 @@ diff --git a/packages/builder/src/components/database/DataTable/AttachmentList.svelte b/packages/builder/src/components/database/DataTable/AttachmentList.svelte index fedcaa73be..04fdbaf4b5 100644 --- a/packages/builder/src/components/database/DataTable/AttachmentList.svelte +++ b/packages/builder/src/components/database/DataTable/AttachmentList.svelte @@ -7,17 +7,17 @@
-{#each files as file} -
- {#if FILE_TYPES.IMAGE.includes(file.extension)} - - {:else} - - .{file.extension} - {file.name} - {/if} -
-{/each} + {#each files as file} +
+ {#if FILE_TYPES.IMAGE.includes(file.extension)} + + {:else} + + .{file.extension} + {file.name} + {/if} +
+ {/each}