Fagner
Fagner
TTCTheo's Typesafe Cult
Created by Fagner on 5/2/2024 in #questions
UploadThing in a backend application
Im gonna take a look in a second! Thank you so much.
18 replies
TTCTheo's Typesafe Cult
Created by Fagner on 5/2/2024 in #questions
UploadThing in a backend application
This here is exactly what Im doing
18 replies
TTCTheo's Typesafe Cult
Created by Fagner on 5/2/2024 in #questions
UploadThing in a backend application
From urls.
18 replies
TTCTheo's Typesafe Cult
Created by Fagner on 5/2/2024 in #questions
UploadThing in a backend application
No description
18 replies
TTCTheo's Typesafe Cult
Created by Fagner on 5/2/2024 in #questions
UploadThing in a backend application
That's exactly what I did initially, I moved from Bun to PNPM back again, because of some gRPC issues, but realized things are getting better and went back to Bun, now facing another issue :Sad:
18 replies
TTCTheo's Typesafe Cult
Created by Fagner on 5/2/2024 in #questions
UploadThing in a backend application
So what should I do then? Wait for a fix or use some other workaround? I see you commented saying that using Buffer works fine, but I'm not sure if I should that or not. Btw, I'm okay with using the API but couldn't understand how to use it, is there any content or project example you could recommend? Thanks! :a_shyemoji:
18 replies
TTCTheo's Typesafe Cult
Created by Fagner on 5/2/2024 in #questions
UploadThing in a backend application
// @/server/utapi.ts
import { env } from "@/env";
import { UTApi } from "uploadthing/server";

export const utapi = new UTApi({
apiKey: env.UPLOADTHING_SECRET
});

// @/index.ts
import { utapi } from "./server/utapi";

const url = "https://fastly.picsum.photos/id/604/200/200.jpg?hmac=qgFjxODI1hMBMfHo68VvLeji-zvG9y-iPYhyW0EkvOs";
utapi.uploadFilesFromUrl([url]);
// @/server/utapi.ts
import { env } from "@/env";
import { UTApi } from "uploadthing/server";

export const utapi = new UTApi({
apiKey: env.UPLOADTHING_SECRET
});

// @/index.ts
import { utapi } from "./server/utapi";

const url = "https://fastly.picsum.photos/id/604/200/200.jpg?hmac=qgFjxODI1hMBMfHo68VvLeji-zvG9y-iPYhyW0EkvOs";
utapi.uploadFilesFromUrl([url]);
18 replies
TTCTheo's Typesafe Cult
Created by Fagner on 5/2/2024 in #questions
UploadThing in a backend application
I tried using the API but I couldn't understand how to use it.
18 replies
TTCTheo's Typesafe Cult
Created by Fagner on 4/20/2024 in #questions
shadcn's form with uploadthing sdk
I didn't find a way to fix this, so I drop the support for passing files and I'm using URLs for now.
7 replies
TTCTheo's Typesafe Cult
Created by Fagner on 7/5/2023 in #questions
Pull template repository
I don't think I should be doing a lot of changes on a template repo too. It's a template repo not a package dependency. I will just focus on making the template as stable as possible, then I won't need to care about future changes
6 replies
TTCTheo's Typesafe Cult
Created by Fagner on 7/5/2023 in #questions
Pull template repository
Manually, you mean?
6 replies
TTCTheo's Typesafe Cult
Created by cyremur on 7/5/2023 in #questions
Memoize function in typescript
:)
26 replies
TTCTheo's Typesafe Cult
Created by cyremur on 7/5/2023 in #questions
Memoize function in typescript
I mean, that's what I think. instead of calling the function it'll check for the memoized data and return the output instead
26 replies
TTCTheo's Typesafe Cult
Created by cyremur on 7/5/2023 in #questions
Memoize function in typescript
Yes
26 replies
TTCTheo's Typesafe Cult
Created by cyremur on 7/5/2023 in #questions
Memoize function in typescript
(I think) the goal is to not execute the function again and again, so the result is always the same since the input is the same
26 replies