<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sad1247</title>
    <description>The latest articles on DEV Community by Sad1247 (@sad1247).</description>
    <link>https://dev.to/sad1247</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4220946%2F7d4c234f-3cee-4800-a3fc-49b317c1febe.png</url>
      <title>DEV Community: Sad1247</title>
      <link>https://dev.to/sad1247</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sad1247"/>
    <language>en</language>
    <item>
      <title>Government upload limits are a mess, so I documented all 18 of them</title>
      <dc:creator>Sad1247</dc:creator>
      <pubDate>Sun, 01 Nov 2026 17:18:31 +0000</pubDate>
      <link>https://dev.to/sad1247/government-upload-limits-are-a-mess-so-i-documented-all-18-of-them-16e</link>
      <guid>https://dev.to/sad1247/government-upload-limits-are-a-mess-so-i-documented-all-18-of-them-16e</guid>
      <description>&lt;p&gt;A few months ago someone told me their permanent residence application had been returned because a scanned document was too big. They had compressed it to 4 MB, which is what the article they read said. The portal they were using allows 5 MB — and the file they actually needed to shrink was a different one.&lt;/p&gt;

&lt;p&gt;That sent me down a hole. I went looking for a table of official upload limits and could not find one that was both correct and sourced. What I found instead was a dozen blog posts confidently quoting numbers that contradict each other, usually with no link to anything official and no date.&lt;/p&gt;

&lt;p&gt;So I built the table. Eighteen limits, each one linked to the page that states it, each one dated. Here is what I learned building it.&lt;/p&gt;

&lt;h2&gt;
  
  
  A single "service" often has several different limits
&lt;/h2&gt;

&lt;p&gt;This is the part that burns people, and almost nothing on the web mentions it.&lt;/p&gt;

&lt;p&gt;Canada's immigration department (IRCC) does not have one upload limit. The secure account, permanent residence and citizenship streams cap each file at 4 MB. The IRCC Portal allows 5 MB. Same department, same applicant, different ceiling depending on which door you came in through. If you compress to 5 MB because that is the number you read, and you are in the secure account, your upload fails.&lt;/p&gt;

&lt;p&gt;France's DossierFacile does the same thing in a different direction: 10 MB per file, but 50 MB per &lt;em&gt;document&lt;/em&gt;, where a document can be several pages uploaded together. Whether you scan your payslips one by one or as a single block decides which limit applies to you.&lt;/p&gt;

&lt;p&gt;Any table that lists one number per organisation is wrong for at least some of its readers. Mine has five rows just for IRCC.&lt;/p&gt;

&lt;h2&gt;
  
  
  The range is five orders of magnitude
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Limit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ICAI exam photo (India)&lt;/td&gt;
&lt;td&gt;50 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;French state services upload&lt;/td&gt;
&lt;td&gt;1 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IRCC secure account (Canada)&lt;/td&gt;
&lt;td&gt;4 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SARS eFiling (South Africa)&lt;/td&gt;
&lt;td&gt;5 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Legal Aid Agency CCMS (UK)&lt;/td&gt;
&lt;td&gt;8 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Microsoft 365 / Exchange&lt;/td&gt;
&lt;td&gt;10 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DossierFacile per file (France)&lt;/td&gt;
&lt;td&gt;10 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gmail&lt;/td&gt;
&lt;td&gt;25 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SEI (Brazil)&lt;/td&gt;
&lt;td&gt;50 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CRA document submission (Canada)&lt;/td&gt;
&lt;td&gt;150 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Slack&lt;/td&gt;
&lt;td&gt;1 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The 50 KB at the top is not a typo. Indian professional exam portals cap the candidate photo and signature at 50 KB each, and every exam season generates a wave of people trying to get a phone photo under that. A modern phone photo is 3 to 5 MB. You need roughly a 100× reduction, which no "compress my image" slider is going to give you without thinking about dimensions first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits move, and nobody announces it
&lt;/h2&gt;

&lt;p&gt;The French state upload fiche I used as a source is from 2018. It is still the most specific public document I could find, and it is almost certainly stale. I flagged it in the table rather than quietly presenting it as current, which is the whole reason the table has a &lt;code&gt;checked&lt;/code&gt; date on it: &lt;code&gt;2026-10-17&lt;/code&gt; at the time of writing.&lt;/p&gt;

&lt;p&gt;That date is the most useful column. A number without a date is a rumour.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the compression has to happen client-side
&lt;/h2&gt;

&lt;p&gt;Here is the part that bothers me about how this problem is usually solved.&lt;/p&gt;

&lt;p&gt;The documents people need to shrink to meet these limits are, overwhelmingly: passports, bank statements, payslips, medical forms, tax filings, proof of funds. The standard advice is "use a free online PDF compressor," which means uploading exactly those documents to a server belonging to a company you have never heard of, under a privacy policy you did not read, in order to satisfy a government portal's file size rule.&lt;/p&gt;

&lt;p&gt;That is a strange trade to make, and it is entirely avoidable. Everything needed to compress, merge, split, convert and OCR a PDF runs fine in a browser now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;pdf-lib&lt;/strong&gt; for structural work — merge, split, rotate, page numbering, metadata&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PDF.js&lt;/strong&gt; for rendering pages to canvas, which is what image-based compression comes down to&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tesseract compiled to WebAssembly&lt;/strong&gt; for OCR, which is the one I expected to be unusable in a browser and which turned out to be fine&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canvas + &lt;code&gt;toBlob&lt;/code&gt;&lt;/strong&gt; with a quality parameter for the actual size reduction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The performance is acceptable. A 40-page scanned PDF compresses in a few seconds on a mid-range laptop, which is slower than a server would be, and nobody cares, because the alternative was uploading their passport.&lt;/p&gt;

&lt;p&gt;The architectural consequence is the interesting bit: there is no upload endpoint in the application at all. Not a locked-down one, not one that deletes files after an hour — none. That is a claim you can verify from the network tab rather than from a privacy policy, which is the only kind of privacy claim worth making.&lt;/p&gt;

&lt;h2&gt;
  
  
  The table
&lt;/h2&gt;

&lt;p&gt;It lives here, with the official source linked on every row and the date each one was last checked:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://pdfroll.com/en/pdf-size-limits/" rel="noopener noreferrer"&gt;Official upload size limits for government portals and services&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The tools that go with it are at &lt;a href="https://pdfroll.com" rel="noopener noreferrer"&gt;pdfroll.com&lt;/a&gt; — free, no account, and everything runs locally.&lt;/p&gt;

&lt;p&gt;If you know of a limit I am missing, or one that has moved since I checked it, tell me in the comments and I will add it with the source. That is the only way a table like this stays true.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>webassembly</category>
      <category>javascript</category>
      <category>privacy</category>
    </item>
  </channel>
</rss>
