From b9479f07a1aa6687230efaddd8e526b3049dada1 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Wed, 8 Nov 2023 10:57:16 -0300 Subject: [PATCH] feat: Update accepted file formats --- .../EntityInspector/GltfInspector/GltfInspector.tsx | 2 ++ .../inspector/src/components/ui/FileUploadField/types.ts | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/packages/@dcl/inspector/src/components/EntityInspector/GltfInspector/GltfInspector.tsx b/packages/@dcl/inspector/src/components/EntityInspector/GltfInspector/GltfInspector.tsx index 795d6ef09..113b62e50 100644 --- a/packages/@dcl/inspector/src/components/EntityInspector/GltfInspector/GltfInspector.tsx +++ b/packages/@dcl/inspector/src/components/EntityInspector/GltfInspector/GltfInspector.tsx @@ -6,6 +6,7 @@ import { useComponentInput } from '../../../hooks/sdk/useComponentInput' import { Block } from '../../Block' import { Container } from '../../Container' import { FileUploadField, Dropdown } from '../../ui' +import { ACCEPTED_FILE_TYPES } from '../../ui/FileUploadField/types' import { Props } from './types' import { fromGltf, toGltf, isValidInput, COLLISION_LAYERS, isModel } from './utils' import { useAppSelector } from '../../../redux/hooks' @@ -44,6 +45,7 @@ export default withSdk(({ sdk, entity }) => { & { onDrop?: (path: string) => void | Promise isValidFile?: (node: TreeNode) => boolean } + +export const ACCEPTED_FILE_TYPES = { + model: ['.gltf', '.glb'], + image: ['.png'], + audio: ['.mp3', '.wav', '.ogg'] +}