Skip to content

Commit ef8ae60

Browse files
committed
fix(file-upload): fixed file upload for mistral parse
1 parent 8ec194a commit ef8ae60

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

apps/sim/blocks/blocks/file.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { DocumentIcon } from '@/components/icons'
2-
import { isProd } from '@/lib/environment'
32
import { createLogger } from '@/lib/logs/console-logger'
43
import type { FileParserOutput } from '@/tools/file/types'
54
import type { BlockConfig, SubBlockConfig, SubBlockLayout, SubBlockType } from '../types'
65

76
const logger = createLogger('FileBlock')
87

9-
const shouldEnableURLInput = isProd
8+
const shouldEnableURLInput = process.env.NODE_ENV === 'production'
109

1110
const inputMethodBlock: SubBlockConfig = {
1211
id: 'inputMethod',

apps/sim/blocks/blocks/mistral_parse.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { MistralIcon } from '@/components/icons'
2-
import { isProd } from '@/lib/environment'
32
import type { MistralParserOutput } from '@/tools/mistral/types'
43
import type { BlockConfig, SubBlockConfig, SubBlockLayout, SubBlockType } from '../types'
54

6-
const shouldEnableFileUpload = isProd
5+
const shouldEnableFileUpload = process.env.NODE_ENV === 'production'
76

87
const inputMethodBlock: SubBlockConfig = {
98
id: 'inputMethod',

apps/sim/lib/uploads/setup.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { existsSync } from 'fs'
22
import { mkdir } from 'fs/promises'
33
import path, { join } from 'path'
4-
import { isProd } from '@/lib/environment'
54
import { createLogger } from '@/lib/logs/console-logger'
65
import { env } from '../env'
76

@@ -11,7 +10,7 @@ const PROJECT_ROOT = path.resolve(process.cwd())
1110

1211
export const UPLOAD_DIR = join(PROJECT_ROOT, 'uploads')
1312

14-
export const USE_S3_STORAGE = isProd
13+
export const USE_S3_STORAGE = process.env.NODE_ENV === 'production'
1514

1615
export const S3_CONFIG = {
1716
bucket: env.S3_BUCKET_NAME || '',

0 commit comments

Comments
 (0)