joschan21 / quill

Quill - A Modern SaaS-Platform Built With Next.js 13
1.88k stars 494 forks source link

Issue with loading pdf #109

Open selvavignesh19 opened 3 weeks ago

selvavignesh19 commented 3 weeks ago

Screenshot 2024-08-29 153618

Failed to load PDF file. I just uploaded one pdf with single page , it shown like this?

NaseerUllahAwan commented 2 weeks ago

I also have this issue, but I cannot solve it with this huge internet. Any solution will be appreciated thanks!

meshjohn commented 1 week ago

i found the solution change the file url to : https://utfs.io/f/${file.key} like this : pdfUploader: f({ pdf: { maxFileSize: "4MB" } }) .middleware(async ({ req }) => { const { getUser } = getKindeServerSession(); const user = await getUser(); if (!user || !user.id) throw new Error("Unauthorized"); return { userId: user.id }; }) .onUploadComplete(async ({ metadata, file }) => { const createdFile = await db.file.create({ data: { key: file.key, name: file.name, userId: metadata.userId, url:https://utfs.io/f/${file.key}, uploadStatus: "PROCESSING", }, }); }),

JatinSri1909 commented 3 days ago

Pdf still not loading but when I open url from prisma studio File's url attribute , it opens

meshjohn commented 2 days ago

Pdf still not loading but when I open url from prisma studio File's url attribute , it opens

Can you explain more or check if there's any error

meshjohn commented 2 days ago

Pdf still not loading but when I open url from prisma studio File's url attribute , it opens

Can you explain more or check if there's any error

meshjohn commented 2 days ago

Pdf still not loading but when I open url from prisma studio File's url attribute , it opens

Can you explain more or check if there's any error

meshjohn commented 2 days ago

Pdf still not loading but when I open url from prisma studio File's url attribute , it opens

Can you explain more or check if there's any error