diff --git a/packages/builder/package.json b/packages/builder/package.json
index ea555007a9..04dab3bf5e 100644
--- a/packages/builder/package.json
+++ b/packages/builder/package.json
@@ -73,10 +73,14 @@
"deepmerge": "^4.2.2",
"fast-sort": "^2.2.0",
"feather-icons": "^4.21.0",
+ "filepond": "^4.20.1",
+ "filepond-plugin-image-exif-orientation": "^1.0.9",
+ "filepond-plugin-image-preview": "^4.6.4",
"lodash": "^4.17.13",
"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/components/common/Dropzone.svelte b/packages/builder/src/components/common/Dropzone.svelte
new file mode 100644
index 0000000000..46bb81c7a7
--- /dev/null
+++ b/packages/builder/src/components/common/Dropzone.svelte
@@ -0,0 +1,39 @@
+
+
+
diff --git a/packages/builder/src/components/common/Spinner.svelte b/packages/builder/src/components/common/Spinner.svelte
index a9c947915c..01199e72ec 100644
--- a/packages/builder/src/components/common/Spinner.svelte
+++ b/packages/builder/src/components/common/Spinner.svelte
@@ -1,5 +1,7 @@
-
+
diff --git a/packages/builder/src/components/database/DataTable/ModelDataTable.svelte b/packages/builder/src/components/database/DataTable/ModelDataTable.svelte
index af99b2bada..36280498c8 100644
--- a/packages/builder/src/components/database/DataTable/ModelDataTable.svelte
+++ b/packages/builder/src/components/database/DataTable/ModelDataTable.svelte
@@ -90,6 +90,10 @@
{#if schema[header].type === 'link'}
+ {:else if schema[header].type === 'attachment'}
+ {#each row[header] || [] as img}
+
+ {/each}
{:else}{getOr('', header, row)}{/if}
|
{/each}
diff --git a/packages/builder/src/components/database/DataTable/modals/RecordFieldControl.svelte b/packages/builder/src/components/database/DataTable/modals/RecordFieldControl.svelte
index ed56618e3e..627d77450c 100644
--- a/packages/builder/src/components/database/DataTable/modals/RecordFieldControl.svelte
+++ b/packages/builder/src/components/database/DataTable/modals/RecordFieldControl.svelte
@@ -1,6 +1,6 @@
@@ -45,7 +53,12 @@
{/each}
{:else if type === 'date'}
-
+
+
+{:else if type === 'file'}
+
+
+
{:else}
{#if type === 'checkbox'}
@@ -64,7 +77,6 @@
label {
font-weight: 500;
font-size: var(--font-size-s);
- float: left;
- margin-right: 8px;
+ margin-bottom: 12px;
}
diff --git a/packages/builder/src/constants/backend/index.js b/packages/builder/src/constants/backend/index.js
index 43a01786f4..502cdbd245 100644
--- a/packages/builder/src/constants/backend/index.js
+++ b/packages/builder/src/constants/backend/index.js
@@ -51,24 +51,15 @@ export const FIELDS = {
},
},
},
- // IMAGE: {
- // name: "File",
- // icon: "ri-image-line",
- // type: "file",
- // constraints: {
- // type: "string",
- // presence: { allowEmpty: true },
- // },
- // },
- // FILE: {
- // name: "Image",
- // icon: "ri-file-line",
- // type: "file",
- // constraints: {
- // type: "string",
- // presence: { allowEmpty: true },
- // },
- // },
+ ATTACHMENT: {
+ name: "Attachment",
+ icon: "ri-file-line",
+ type: "attachment",
+ constraints: {
+ type: "array",
+ presence: { allowEmpty: true },
+ },
+ },
// LINKED_FIELDS: {
// name: "Linked Fields",
// icon: "ri-link",
diff --git a/packages/builder/src/pages/[application]/deploy/index.svelte b/packages/builder/src/pages/[application]/deploy/index.svelte
index bc13e797f9..ad4f05da20 100644
--- a/packages/builder/src/pages/[application]/deploy/index.svelte
+++ b/packages/builder/src/pages/[application]/deploy/index.svelte
@@ -48,12 +48,12 @@
{/if}
-
+