Aleed.dev
Aleed.dev
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Aleed.dev on 9/4/2024 in #questions
data optimization
thank you soo muhc what time will you be available ?
4 replies
TTCTheo's Typesafe Cult
Created by MarvinKR on 7/11/2024 in #questions
How to use uploadthing server side?
this should work for you
14 replies
TTCTheo's Typesafe Cult
Created by Grimmjoww231 on 7/11/2024 in #questions
upload thing multiple images in one form
add the maxFilecount should do 🤔
13 replies
TTCTheo's Typesafe Cult
Created by Grimmjoww231 on 7/11/2024 in #questions
upload thing multiple images in one form

imageUploader: f({ image: { maxFileSize: "4MB" ,maxFileCount:10} })

imageUploader: f({ image: { maxFileSize: "4MB" ,maxFileCount:10} })
13 replies
TTCTheo's Typesafe Cult
Created by Grimmjoww231 on 7/11/2024 in #questions
upload thing multiple images in one form
did you change your config to allow multi file upload ?
13 replies
TTCTheo's Typesafe Cult
Created by MarvinKR on 7/11/2024 in #questions
How to use uploadthing server side?
@MarvinKR
import { UTApi } from "uploadthing/server";
export const utapi = new UTApi();

// in ur upload file
import { utapi } from "~/server/uploadthing.ts";

async function uploadFiles(formData: FormData) {

const files =formData.getAll("files");
const response = await utapi.uploadFiles(files);
// ^? UploadedFileResponse[]
}
import { UTApi } from "uploadthing/server";
export const utapi = new UTApi();

// in ur upload file
import { utapi } from "~/server/uploadthing.ts";

async function uploadFiles(formData: FormData) {

const files =formData.getAll("files");
const response = await utapi.uploadFiles(files);
// ^? UploadedFileResponse[]
}
14 replies
TTCTheo's Typesafe Cult
Created by MarvinKR on 7/11/2024 in #questions
How to use uploadthing server side?
are you using next ?
14 replies
TTCTheo's Typesafe Cult
Created by Grimmjoww231 on 7/11/2024 in #questions
upload thing multiple images in one form
are you using upload thing ?
13 replies
TTCTheo's Typesafe Cult
Created by K1|ller on 7/10/2024 in #questions
Generating pdfs - what are you using?
@K1|ller this is what I normally I use https://react-pdf.org/
6 replies
TTCTheo's Typesafe Cult
Created by Kenzo on 7/8/2024 in #questions
Caching does not work with trpc in Next, what would you do?
ummm don't know if this should work for you https://react.dev/reference/react/cache.
26 replies
TTCTheo's Typesafe Cult
Created by Jotas on 7/7/2024 in #questions
Whats the point of this ternary operator in the nextjs homepage of Create T3 App?
7 replies
TTCTheo's Typesafe Cult
Created by Jotas on 7/7/2024 in #questions
Whats the point of this ternary operator in the nextjs homepage of Create T3 App?
so here is what you are doing
const hello = await api.post.hello({ text: "from tRPC" }); // you are basically saying wait till this fetch is done before you proceed .
{hello ? hello.greeting : "Loading tRPC query..."}// by the time you get to this point is fetch is already done so what you are saying is. if hello has data show hello.greaeting else show loading
const hello = await api.post.hello({ text: "from tRPC" }); // you are basically saying wait till this fetch is done before you proceed .
{hello ? hello.greeting : "Loading tRPC query..."}// by the time you get to this point is fetch is already done so what you are saying is. if hello has data show hello.greaeting else show loading
7 replies
TTCTheo's Typesafe Cult
Created by Jotas on 7/7/2024 in #questions
Whats the point of this ternary operator in the nextjs homepage of Create T3 App?
to show loading state you can use react supense for that
7 replies
TTCTheo's Typesafe Cult
Created by Jotas on 7/7/2024 in #questions
Whats the point of this ternary operator in the nextjs homepage of Create T3 App?
hey what you are checking is if the data exist not if the data is loading
7 replies
TTCTheo's Typesafe Cult
Created by Børge on 8/20/2023 in #questions
Creating logout as next-auth?
Ummm so I might not be right like have a wrapper along ur component that use useffect to fetch the cookies so that when ever the cookies get cleared it redirect the person back to login
11 replies
TTCTheo's Typesafe Cult
Created by parapheen on 4/14/2023 in #questions
How to inject dynamic meta tags with Next-Seo
hey maybe check next-seo i think it should work with your use case https://github.com/garmeeh/next-seo
4 replies