From 436d6a1585a9d904b0339e7331d24a43e3ba135f Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Mon, 30 Oct 2023 14:39:12 +0000 Subject: [PATCH] Revert frontend changes to filter out file extensions in the upload box. --- packages/bbui/src/Form/Dropzone.svelte | 2 -- .../components/backend/DataTable/RowFieldControl.svelte | 8 +------- .../src/components/app/forms/AttachmentField.svelte | 6 +----- .../src/components/grid/cells/AttachmentCell.svelte | 3 --- 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/packages/bbui/src/Form/Dropzone.svelte b/packages/bbui/src/Form/Dropzone.svelte index 94742ea08d..2a6fa1c57b 100644 --- a/packages/bbui/src/Form/Dropzone.svelte +++ b/packages/bbui/src/Form/Dropzone.svelte @@ -17,7 +17,6 @@ export let fileTags = [] export let maximum = undefined export let compact = false - export let extensions = undefined const dispatch = createEventDispatcher() const onChange = e => { @@ -40,7 +39,6 @@ {fileTags} {maximum} {compact} - {extensions} on:change={onChange} /> diff --git a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte index ea1161fe9b..61b706e28e 100644 --- a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte +++ b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte @@ -13,8 +13,6 @@ import { capitalise } from "helpers" import LinkedRowSelector from "components/common/LinkedRowSelector.svelte" import Editor from "../../integration/QueryEditor.svelte" - import { ValidFileExtensions } from "@budibase/shared-core" - import { admin } from "stores/portal" export let defaultValue export let meta @@ -22,10 +20,6 @@ export let readonly export let error - let validExtensions = $admin.cloud - ? ValidFileExtensions.map(ext => `.${ext}`).join(", ") - : "*" - const resolveTimeStamp = timestamp => { if (!timestamp) { return null @@ -65,7 +59,7 @@ bind:value /> {:else if type === "attachment"} - + {:else if type === "boolean"} {:else if type === "array" && meta.constraints.inclusion.length !== 0} diff --git a/packages/client/src/components/app/forms/AttachmentField.svelte b/packages/client/src/components/app/forms/AttachmentField.svelte index e57510c770..e24115ebc0 100644 --- a/packages/client/src/components/app/forms/AttachmentField.svelte +++ b/packages/client/src/components/app/forms/AttachmentField.svelte @@ -2,17 +2,13 @@ import Field from "./Field.svelte" import { CoreDropzone } from "@budibase/bbui" import { getContext } from "svelte" - import { ValidFileExtensions } from "@budibase/shared-core" - import { environmentStore } from "../../../stores/index.js" export let field export let label export let disabled = false export let compact = false export let validation - export let extensions = $environmentStore.cloud - ? ValidFileExtensions.map(ext => `.${ext}`).join(", ") - : "*" + export let extensions export let onChange export let maximum = undefined diff --git a/packages/frontend-core/src/components/grid/cells/AttachmentCell.svelte b/packages/frontend-core/src/components/grid/cells/AttachmentCell.svelte index 4e2a6025e5..a27c31bbe5 100644 --- a/packages/frontend-core/src/components/grid/cells/AttachmentCell.svelte +++ b/packages/frontend-core/src/components/grid/cells/AttachmentCell.svelte @@ -2,7 +2,6 @@ import { onMount } from "svelte" import { getContext } from "svelte" import { Dropzone } from "@budibase/bbui" - import { ValidFileExtensions } from "@budibase/shared-core" export let value export let focused = false @@ -14,7 +13,6 @@ const { API, notifications } = getContext("grid") const imageExtensions = ["png", "tiff", "gif", "raw", "jpg", "jpeg"] - const validExtensions = ValidFileExtensions.map(ext => `.${ext}`).join(", ") let isOpen = false @@ -98,7 +96,6 @@ {value} compact on:change={e => onChange(e.detail)} - extensions={validExtensions} {processFiles} {deleteAttachments} {handleFileTooLarge}