mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 23:17:59 -05:00
fix(file-upload): fixed file upload for mistral parse
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import { DocumentIcon } from '@/components/icons'
|
||||
import { isProd } from '@/lib/environment'
|
||||
import { createLogger } from '@/lib/logs/console-logger'
|
||||
import type { FileParserOutput } from '@/tools/file/types'
|
||||
import type { BlockConfig, SubBlockConfig, SubBlockLayout, SubBlockType } from '../types'
|
||||
|
||||
const logger = createLogger('FileBlock')
|
||||
|
||||
const shouldEnableURLInput = isProd
|
||||
const shouldEnableURLInput = process.env.NODE_ENV === 'production'
|
||||
|
||||
const inputMethodBlock: SubBlockConfig = {
|
||||
id: 'inputMethod',
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { MistralIcon } from '@/components/icons'
|
||||
import { isProd } from '@/lib/environment'
|
||||
import type { MistralParserOutput } from '@/tools/mistral/types'
|
||||
import type { BlockConfig, SubBlockConfig, SubBlockLayout, SubBlockType } from '../types'
|
||||
|
||||
const shouldEnableFileUpload = isProd
|
||||
const shouldEnableFileUpload = process.env.NODE_ENV === 'production'
|
||||
|
||||
const inputMethodBlock: SubBlockConfig = {
|
||||
id: 'inputMethod',
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { existsSync } from 'fs'
|
||||
import { mkdir } from 'fs/promises'
|
||||
import path, { join } from 'path'
|
||||
import { isProd } from '@/lib/environment'
|
||||
import { createLogger } from '@/lib/logs/console-logger'
|
||||
import { env } from '../env'
|
||||
|
||||
@@ -11,7 +10,7 @@ const PROJECT_ROOT = path.resolve(process.cwd())
|
||||
|
||||
export const UPLOAD_DIR = join(PROJECT_ROOT, 'uploads')
|
||||
|
||||
export const USE_S3_STORAGE = isProd
|
||||
export const USE_S3_STORAGE = process.env.NODE_ENV === 'production'
|
||||
|
||||
export const S3_CONFIG = {
|
||||
bucket: env.S3_BUCKET_NAME || '',
|
||||
|
||||
Reference in New Issue
Block a user