2
0

♻️ Move s3-related files to specific lib folder

This commit is contained in:
Baptiste Arnaud
2023-08-30 09:36:45 +02:00
parent 9a79bc38ee
commit 23b629f82c
12 changed files with 9 additions and 40 deletions

View File

@@ -1,7 +1,7 @@
import { useToast } from '@/hooks/useToast'
import { Button, ButtonProps, chakra } from '@chakra-ui/react'
import { ChangeEvent, useState } from 'react'
import { uploadFiles } from '@typebot.io/lib/uploadFiles'
import { uploadFiles } from '@typebot.io/lib/s3/uploadFiles'
import { compressFile } from '@/helpers/compressFile'
type UploadButtonProps = {

View File

@@ -2,10 +2,10 @@ import { NextApiRequest, NextApiResponse } from 'next'
import { getAuthenticatedUser } from '@/features/auth/helpers/getAuthenticatedUser'
import {
badRequest,
generatePresignedUrl,
methodNotAllowed,
notAuthenticated,
} from '@typebot.io/lib/api'
import { generatePresignedUrl } from '@typebot.io/lib/s3/generatePresignedUrl'
import { env } from '@typebot.io/env'
const handler = async (

View File

@@ -10,7 +10,7 @@ import {
} from '@typebot.io/schemas'
import { byId, isDefined } from '@typebot.io/lib'
import { z } from 'zod'
import { generatePresignedUrl } from '@typebot.io/lib/api/generatePresignedUrl'
import { generatePresignedUrl } from '@typebot.io/lib/s3/generatePresignedUrl'
import { env } from '@typebot.io/env'
export const getUploadUrl = publicProcedure

View File

@@ -1,6 +1,6 @@
import got from 'got'
import { TRPCError } from '@trpc/server'
import { uploadFileToBucket } from '@typebot.io/lib/api/uploadFileToBucket'
import { uploadFileToBucket } from '@typebot.io/lib/s3/uploadFileToBucket'
type Props = {
mediaId: string