fix(file-upload): fixed file upload for mistral parse

This commit is contained in:
Waleed Latif
2025-05-24 22:44:05 -07:00
parent 8ec194a604
commit ef8ae60afd
3 changed files with 3 additions and 6 deletions

View File

@@ -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',

View File

@@ -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',

View File

@@ -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 || '',