Revert frontend changes to filter out file extensions in the upload box.

This commit is contained in:
Sam Rose 2023-10-30 14:39:12 +00:00
parent 00aca08741
commit 436d6a1585
No known key found for this signature in database
4 changed files with 2 additions and 17 deletions

View File

@ -17,7 +17,6 @@
export let fileTags = [] export let fileTags = []
export let maximum = undefined export let maximum = undefined
export let compact = false export let compact = false
export let extensions = undefined
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
const onChange = e => { const onChange = e => {
@ -40,7 +39,6 @@
{fileTags} {fileTags}
{maximum} {maximum}
{compact} {compact}
{extensions}
on:change={onChange} on:change={onChange}
/> />
</Field> </Field>

View File

@ -13,8 +13,6 @@
import { capitalise } from "helpers" import { capitalise } from "helpers"
import LinkedRowSelector from "components/common/LinkedRowSelector.svelte" import LinkedRowSelector from "components/common/LinkedRowSelector.svelte"
import Editor from "../../integration/QueryEditor.svelte" import Editor from "../../integration/QueryEditor.svelte"
import { ValidFileExtensions } from "@budibase/shared-core"
import { admin } from "stores/portal"
export let defaultValue export let defaultValue
export let meta export let meta
@ -22,10 +20,6 @@
export let readonly export let readonly
export let error export let error
let validExtensions = $admin.cloud
? ValidFileExtensions.map(ext => `.${ext}`).join(", ")
: "*"
const resolveTimeStamp = timestamp => { const resolveTimeStamp = timestamp => {
if (!timestamp) { if (!timestamp) {
return null return null
@ -65,7 +59,7 @@
bind:value bind:value
/> />
{:else if type === "attachment"} {:else if type === "attachment"}
<Dropzone {label} {error} extensions={validExtensions} bind:value /> <Dropzone {label} {error} bind:value />
{:else if type === "boolean"} {:else if type === "boolean"}
<Toggle text={label} {error} bind:value /> <Toggle text={label} {error} bind:value />
{:else if type === "array" && meta.constraints.inclusion.length !== 0} {:else if type === "array" && meta.constraints.inclusion.length !== 0}

View File

@ -2,17 +2,13 @@
import Field from "./Field.svelte" import Field from "./Field.svelte"
import { CoreDropzone } from "@budibase/bbui" import { CoreDropzone } from "@budibase/bbui"
import { getContext } from "svelte" import { getContext } from "svelte"
import { ValidFileExtensions } from "@budibase/shared-core"
import { environmentStore } from "../../../stores/index.js"
export let field export let field
export let label export let label
export let disabled = false export let disabled = false
export let compact = false export let compact = false
export let validation export let validation
export let extensions = $environmentStore.cloud export let extensions
? ValidFileExtensions.map(ext => `.${ext}`).join(", ")
: "*"
export let onChange export let onChange
export let maximum = undefined export let maximum = undefined

View File

@ -2,7 +2,6 @@
import { onMount } from "svelte" import { onMount } from "svelte"
import { getContext } from "svelte" import { getContext } from "svelte"
import { Dropzone } from "@budibase/bbui" import { Dropzone } from "@budibase/bbui"
import { ValidFileExtensions } from "@budibase/shared-core"
export let value export let value
export let focused = false export let focused = false
@ -14,7 +13,6 @@
const { API, notifications } = getContext("grid") const { API, notifications } = getContext("grid")
const imageExtensions = ["png", "tiff", "gif", "raw", "jpg", "jpeg"] const imageExtensions = ["png", "tiff", "gif", "raw", "jpg", "jpeg"]
const validExtensions = ValidFileExtensions.map(ext => `.${ext}`).join(", ")
let isOpen = false let isOpen = false
@ -98,7 +96,6 @@
{value} {value}
compact compact
on:change={e => onChange(e.detail)} on:change={e => onChange(e.detail)}
extensions={validExtensions}
{processFiles} {processFiles}
{deleteAttachments} {deleteAttachments}
{handleFileTooLarge} {handleFileTooLarge}