🐛 (whatsapp) Fix WA preview not starting and accept audio and documents messages

This commit is contained in:
Baptiste Arnaud
2023-12-20 10:35:34 +01:00
parent a6536461e5
commit 780b4dee18
28 changed files with 619 additions and 192 deletions

View File

@@ -42,22 +42,7 @@ export type FilePathUploadProps = z.infer<
>
export const generateUploadUrl = authenticatedProcedure
.meta({
openapi: {
method: 'POST',
path: '/generate-upload-url',
summary: 'Generate upload URL',
description: 'Generate the needed URL to upload a file from the client',
},
})
.input(inputSchema)
.output(
z.object({
presignedUrl: z.string(),
formData: z.record(z.string(), z.any()),
fileUrl: z.string(),
})
)
.mutation(async ({ input: { filePathProps, fileType }, ctx: { user } }) => {
if (!env.S3_ENDPOINT || !env.S3_ACCESS_KEY || !env.S3_SECRET_KEY)
throw new TRPCError({