D4rzk
D4rzk
TTCTheo's Typesafe Cult
Created by D4rzk on 7/16/2024 in #questions
Uploadthing and S3
So if you were me, what would you do? Would you use S3 or uploadthing? I still don't quite understand how the price of the S3 is calculated... Could you confirm then that it is like this: https://chatgpt.com/share/965a07a1-05ba-4c68-b2a1-8b5e3b22ca66 ? I'm sorry, but I really don't get it and I must have something wrong because $50 (max) to $10?
5 replies
TTCTheo's Typesafe Cult
Created by D4rzk on 5/8/2024 in #questions
Error - Something went wrong. Please contact UploadThing
thanks u are my hero ❤️
21 replies
TTCTheo's Typesafe Cult
Created by D4rzk on 5/8/2024 in #questions
Error - Something went wrong. Please contact UploadThing
Yep it works now
21 replies
TTCTheo's Typesafe Cult
Created by D4rzk on 5/8/2024 in #questions
Error - Something went wrong. Please contact UploadThing
ok thanks
21 replies
TTCTheo's Typesafe Cult
Created by D4rzk on 5/8/2024 in #questions
Error - Something went wrong. Please contact UploadThing
Unfortunately, I need
21 replies
TTCTheo's Typesafe Cult
Created by D4rzk on 5/8/2024 in #questions
Error - Something went wrong. Please contact UploadThing
Do u want my code?
21 replies
TTCTheo's Typesafe Cult
Created by D4rzk on 5/8/2024 in #questions
Error - Something went wrong. Please contact UploadThing
21 replies
TTCTheo's Typesafe Cult
Created by D4rzk on 5/8/2024 in #questions
Error - Something went wrong. Please contact UploadThing
No description
21 replies
TTCTheo's Typesafe Cult
Created by D4rzk on 5/8/2024 in #questions
Error - Something went wrong. Please contact UploadThing
@julius
21 replies
TTCTheo's Typesafe Cult
Created by D4rzk on 5/8/2024 in #questions
Error - Something went wrong. Please contact UploadThing
code: core.ts
import { createUploadthing, type FileRouter } from 'uploadthing/next'
import { z } from 'zod'

const f = createUploadthing()

export const ourFileRouter = {
imageUploader: f({ image: { maxFileSize: '4MB' } })
.input(z.object({ configId: z.string().optional() }))
.middleware(async ({ input }) => {
return { input }
})
.onUploadComplete(async ({ metadata }) => {
const { configId } = metadata.input

return { configId }
}),
} satisfies FileRouter

export type OurFileRouter = typeof ourFileRouter
import { createUploadthing, type FileRouter } from 'uploadthing/next'
import { z } from 'zod'

const f = createUploadthing()

export const ourFileRouter = {
imageUploader: f({ image: { maxFileSize: '4MB' } })
.input(z.object({ configId: z.string().optional() }))
.middleware(async ({ input }) => {
return { input }
})
.onUploadComplete(async ({ metadata }) => {
const { configId } = metadata.input

return { configId }
}),
} satisfies FileRouter

export type OurFileRouter = typeof ourFileRouter
route.ts
import { createRouteHandler } from 'uploadthing/next'

import { ourFileRouter } from './core'

export const { GET, POST } = createRouteHandler({
router: ourFileRouter,
})
import { createRouteHandler } from 'uploadthing/next'

import { ourFileRouter } from './core'

export const { GET, POST } = createRouteHandler({
router: ourFileRouter,
})
21 replies
TTCTheo's Typesafe Cult
Created by D4rzk on 5/8/2024 in #questions
Error - Something went wrong. Please contact UploadThing
server console:
ℹ UPLOADTHING 7:05:25 PM UploadThing dev server is now running!
POST /api/uploadthing?actionType=upload&slug=imageUploader 200 in 1981ms
ℹ UPLOADTHING 7:05:31 PM [
ℹ UPLOADTHING 7:05:31 PM "SIMULATING FILE UPLOAD WEBHOOK CALLBACK",
ℹ UPLOADTHING 7:05:31 PM "http://localhost:3000/api/uploadthing?slug=imageUploader"
ℹ UPLOADTHING 7:05:31 PM ]
ℹ UPLOADTHING 7:05:31 PM UploadThing dev server is now running!
POST /api/uploadthing?slug=imageUploader 200 in 620ms
ℹ UPLOADTHING 7:05:32 PM [
ℹ UPLOADTHING 7:05:32 PM "Successfully simulated callback for file",
ℹ UPLOADTHING 7:05:32 PM "e9cd5020-282f-4d37-ab97-d5a727f12583-2487m.jpg"
ℹ UPLOADTHING 7:05:32 PM ]
ℹ UPLOADTHING 7:05:25 PM UploadThing dev server is now running!
POST /api/uploadthing?actionType=upload&slug=imageUploader 200 in 1981ms
ℹ UPLOADTHING 7:05:31 PM [
ℹ UPLOADTHING 7:05:31 PM "SIMULATING FILE UPLOAD WEBHOOK CALLBACK",
ℹ UPLOADTHING 7:05:31 PM "http://localhost:3000/api/uploadthing?slug=imageUploader"
ℹ UPLOADTHING 7:05:31 PM ]
ℹ UPLOADTHING 7:05:31 PM UploadThing dev server is now running!
POST /api/uploadthing?slug=imageUploader 200 in 620ms
ℹ UPLOADTHING 7:05:32 PM [
ℹ UPLOADTHING 7:05:32 PM "Successfully simulated callback for file",
ℹ UPLOADTHING 7:05:32 PM "e9cd5020-282f-4d37-ab97-d5a727f12583-2487m.jpg"
ℹ UPLOADTHING 7:05:32 PM ]
21 replies