File Upload to Context & Skills Keeps Failing #517
|
Hi, I installed Cloudflare OS using the official deployment script to my Cloudflare account. I was able to enable Context & Skills, but when I try to upload a PDF file it keeps failing with a generic "Uploaded 0 files, 1 failed" without any more detail. I don't see any network activity in the development console. Looking at the "PREFIX-gk-context" worker I don't see any errors. I am very new to Cloudflare OS, so it's likely a configuration error somewhere. Can someone please help me troubleshoot this? Thank you! |
Replies: 2 comments
|
The first thing I would check is the PDF size. Context & Skills currently caps a stored document at 1,800,000 bytes (including a small amount of record metadata):
Unfortunately the current bulk-upload UI catches that exception and only increments its Try uploading a very small PDF (well below 1.8 MB) to the same collection. If that works, compress or split the original PDF before uploading it. Note that the limit applies to the decoded PDF plus record overhead, so do not target exactly 1,800,000 bytes. If even a tiny PDF fails, try a tiny |
|
Thanks @Dotoryman! That is it. I am able to upload tiny PDF and TXT files, so it must be the limit. I deployed using the Cloudflare web deploy functionality, so now I have to actually learn the deployment details and figure out where to change MAX_DOCUMENT_BODY_BYTES =) |
The first thing I would check is the PDF size. Context & Skills currently caps a stored document at 1,800,000 bytes (including a small amount of record metadata):
MAX_DOCUMENT_BODY_BYTESDocument is too largewhen the encoded record exceeds that limit (source).Unfortunately the current bulk-upload UI catches that exception and only increments its
failedcounter, so the useful error message is discarded and the toast becomes exactlyUploaded 0 files, 1 failed(upload handler). That also explains why the UI gives you no diagnostic detail.Try uploading a very small PDF (well below 1.8 MB) to the same collection. If that works, compress or split the original PDF befo…