Open rossman22590 opened 10 months ago
my pdf is only 2 pages and small
The error is triggered when the file status is set to FAILED
. This can occur due to various reasons, not just because the file exceeds three pages. In fact, the message displayed in the user interface can be misleading. I recommend verifying that your file has been successfully uploaded to UploadThing and vectorized in Pinecone (please check their respective platforms for confirmation). For debugging purposes, you can refer to this section:
https://github.com/abdeltif-b/researchqai/blob/7bdc7fb444eec66314dc060d4cf062436903c6ce/src/app/api/uploadthing/core.ts#L83
i confirm it has uploaded to upload thing
do i have to change this? const response = await fetch(https://uploadthing-prod.s3.us-west-2.amazonaws.com/${file.key}
);
also i get this too httpUtils-f58ceda1.mjs:104
POST http://localhost:3000/api/trpc/getFile?batch=1 404 (Not Found)
fetchHTTPResponse @ httpUtils-f58ceda1.mjs:104 await in fetchHTTPResponse (async) eval @ httpUtils-f58ceda1.mjs:116 httpRequest @ httpUtils-f58ceda1.mjs:115 jsonHttpRequester @ httpUtils-f58ceda1.mjs:80 eval @ httpBatchLink-204206a5.mjs:217 dispatch @ httpBatchLink-204206a5.mjs:80 setTimeout (async) load @ httpBatchLink-204206a5.mjs:116 eval @ httpBatchLink-204206a5.mjs:183 subscribe @ observable-ade1bad8.mjs:43 eval @ splitLink-4c75f7be.mjs:20 subscribe @ observable-ade1bad8.mjs:43 startIfNeeded @ index.mjs:12 subscribe @ index.mjs:42 eval @ index.mjs:122 observableToPromise @ index.mjs:112 requestAsPromise @ index.mjs:33 mutation @ index.mjs:54 mutationFn @ createHooksInternal-f1d4019d.mjs:408 fn @ mutation.mjs:87 run @ retryer.mjs:101 createRetryer @ retryer.mjs:149 executeMutation @ mutation.mjs:81 execute @ mutation.mjs:138 await in execute (async) mutate @ mutationObserver.mjs:85 eval @ useMutation.mjs:19 onDrop @ UploadButton.tsx:83 await in onDrop (async) eval @ index.js:649 eval @ index.js:698 Promise.then (async) eval @ index.js:697 eval @ index.js:766 eval @ index.js:169 eval @ index.js:167 callCallback @ react-dom.development.js:19465 invokeGuardedCallbackImpl @ react-dom.development.js:19514 invokeGuardedCallback @ react-dom.development.js:19589 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:19603 executeDispatch @ react-dom.development.js:30651 processDispatchQueueItemsInOrder @ react-dom.development.js:30683 processDispatchQueue @ react-dom.development.js:30696 dispatchEventsForPlugins @ react-dom.development.js:30707 eval @ react-dom.development.js:30897 batchedUpdates$1 @ react-dom.development.js:23766 batchedUpdates @ react-dom.development.js:27613 dispatchEventForPluginEventSystem @ react-dom.development.js:30896 dispatchEvent @ react-dom.development.js:28669 dispatchDiscreteEvent @ react-dom.development.js:28640 httpUtils-f58ceda1.mjs:104
POST http://localhost:3000/api/trpc/getFile?batch=1 404 (Not Found) any idea?
⨯ [PineconeError: PineconeClient: Error calling query: PineconeError: PineconeClient: Error calling queryRaw: FetchError: The request failed and the interceptors did not return an alternative response] ⨯ [PineconeError: PineconeClient: Error calling query: PineconeError: PineconeClient: Error calling queryRaw: FetchError: The request failed and the interceptors did not return an alternative response] [UT] UploadThing dev server is now running! [UT] SIMULATING FILE UPLOAD WEBHOOK CALLBACK http://localhost:3000/api/uploadthing?slug=freePlanUploader [UT] UploadThing dev server is now running! [UT] Successfully simulated callback for file 397aca7c-34a3-4fac-b790-7e0410b2f5a3-lsyfcf.pdf ⨯ [PineconeError: PineconeClient: Error calling query: PineconeError: PineconeClient: Error calling queryRaw: FetchError: The request failed and the interceptors did not return an alternative response]
tensting some stuff now to try and solve
got it working, also where is number of PDF enforced, i was able upload 10 on free
The link https://uploadthing-prod.s3.us-west-2.amazonaws.com
is the default public bucket used by UploadThing (at least for free tier users), so there's no need to modify it.
The current version does not impose a limit on the number of PDFs that can be uploaded. To enforce such a limit, one approach is to implement custom logic within the UploadThing core file uploadthing/core.ts
A simple solution would involve querying the File
model with Prisma to count how many files have been uploaded during the current month. However, you have the flexibility to explore other potential solutions as well.
really great job man ,tI will try this solution , should i make a PR? -if it works
Thank you, yes please feel free to make a PR with your solution and I will check it out
On Wed, Oct 18, 2023, 21:55 Ross Cohen @.***> wrote:
really great job man ,tI will try this solution , should i make a PR? -if it works
— Reply to this email directly, view it on GitHub https://github.com/abdeltif-b/researchqai/issues/1#issuecomment-1769306211, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLG74CQ6WGNNBNYNSGOZXTYAA64DAVCNFSM6AAAAAA6BX56JCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRZGMYDMMRRGE . You are receiving this because you commented.Message ID: @.***>
Failed to process the PDF Your Free plan supports up to 3 pages per PDF.