You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[OS-38] Uploads go to R2, up to Zenodo's limit #1695
Every browser upload goes to Convex's file storage through the Convex address, which Cloudflare's proxy caps at 100 MB a request on dev (Free plan) and 500 MB on prod (Enterprise). Our own code caps a PDF at 100 MB. Supplements and large reports need Zenodo's limit, 50 GB a record.
Done when
The browser uploads straight to R2 through a signed address, never through our proxy or Convex, in parts for large files: the report PDF, extraction PDFs, screening files, community settings files and assistant files.
Everything that reads an uploaded file reads it from R2: the report reading, checks, byline page, cover, the report's download address and the Zenodo and DOCiD deposits.
A file of several GB reaches Zenodo streamed from R2, never held whole in memory. Proven on dev with a 5 GB file.
Files already in Convex storage are copied to R2 by a migration, checked by count and size.
The report PDF's limit is Zenodo's, 50 GB.
Out of scope: the paper PDFs the assistant downloads, which are in R2 already.
Part 1 merged in #1699 (7631ae73) and deployed on dev: report PDFs and covers go from the browser straight to R2 (bucket openscholar-uploads-dev), in 64 MB parts above 64 MB, and are served only through short-lived signed addresses after an access check. migrations/reportFilesToR2 moved dev's 1,857 report files (576 MB) out of Convex storage. Checked on dev: a PDF and its cover uploaded in a browser went straight to R2 and were read (3 pages, text kept in R2).
Left for this issue: extraction, screening, community settings and assistant uploads; the report PDF's own limit (proposed 500 MB, since it is read whole in memory; waiting on a decision); prod's bucket, token and UPLOADS_* settings at promotion, then the same migration.
Activity
feat(uploads): report PDFs and covers go straight to R2 (#1699)
sickerine commentedon Dec 1, 2026
Part 1 merged in #1699 (
7631ae73) and deployed on dev: report PDFs and covers go from the browser straight to R2 (bucketopenscholar-uploads-dev), in 64 MB parts above 64 MB, and are served only through short-lived signed addresses after an access check.migrations/reportFilesToR2moved dev's 1,857 report files (576 MB) out of Convex storage. Checked on dev: a PDF and its cover uploaded in a browser went straight to R2 and were read (3 pages, text kept in R2).Left for this issue: extraction, screening, community settings and assistant uploads; the report PDF's own limit (proposed 500 MB, since it is read whole in memory; waiting on a decision); prod's bucket, token and
UPLOADS_*settings at promotion, then the same migration.feat(reports): a report's PDF can be 500 MB (#1700)