2
0

🐛 (fileUpload) Fix private file upload URLs

Closes #1761
This commit is contained in:
Baptiste Arnaud
2024-09-04 11:15:18 +02:00
parent 653ef4edb4
commit 2a767e02b0

View File

@ -55,7 +55,7 @@ export const generateUploadUrl = publicProcedure
const typebotId = session.state.typebotsQueue[0].typebot.id
const isPreview = session.state.typebotsQueue[0].resultId
const isPreview = !session.state.typebotsQueue[0].resultId
const typebot = session.state.typebotsQueue[0].resultId
? await getAndParsePublicTypebot(
@ -99,7 +99,7 @@ export const generateUploadUrl = publicProcedure
const resultId = session.state.typebotsQueue[0].resultId
const filePath =
'workspaceId' in typebot && typebot.workspaceId
'workspaceId' in typebot && typebot.workspaceId && resultId
? `${visibility === 'Private' ? 'private' : 'public'}/workspaces/${
typebot.workspaceId
}/typebots/${typebotId}/results/${resultId}/${fileName}`