feat: files up to 4 GB again (Dropstar, 2026-10-28)
All checks were successful
Build and deploy / Validate source (push) Successful in 1m5s
Build and deploy / Integration suite on a real stack (push) Successful in 5m22s
Build and deploy / Secret scan and release gate (push) Successful in 9s
Build and deploy / Publish images (push) Successful in 1m24s

It was 5 GB, then 1 GB from 2026-10-21. ClamAV keeps scanning up to its own
2000 MiB limit; a larger file passes by the file-format check, as before
the 1 GB limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-28 09:58:42 -03:00
parent 312e1e3aa3
commit ee6344dc74
10 changed files with 20 additions and 19 deletions

View File

@@ -167,9 +167,9 @@ try{
assert.deepEqual(await evaluate(`({shown:!$('tipoEnvio').hidden,
on:[...document.querySelectorAll('#tipoEnvio .cam.on')].map(b=>b.dataset.tipo)})`),
{shown:true,on:['folha']});
await evaluate(`(()=>{const f=new File(['x'],'oversize.cdr');Object.defineProperty(f,'size',{value:1073741824+1});return sel([f]);})()`);
assert.equal(await evaluate(`folhas.length===0 && $('recusa').textContent.includes('1 GB')`),true,
'files beyond the 1 GB upload limit are rejected before browser analysis');
await evaluate(`(()=>{const f=new File(['x'],'oversize.cdr');Object.defineProperty(f,'size',{value:4294967296+1});return sel([f]);})()`);
assert.equal(await evaluate(`folhas.length===0 && $('recusa').textContent.includes('4 GB')`),true,
'files beyond the 4 GB upload limit are rejected before browser analysis');
// A large sheet (here 900 MB) is the normal order: graded from the pixel size in its
// header, never decoded. 6732 x 35433 px across 57 cm is 3 m at 300 DPI.
await evaluate(`(()=>{const h=new Uint8Array(33);h.set([0x89,0x50,0x4E,0x47,0x0D,0x0A,0x1A,0x0A,0,0,0,13,0x49,0x48,0x44,0x52]);

View File

@@ -117,8 +117,8 @@ def run():
client=Client();other=Client()
config=client.call('/session');other.call('/session')
assert client.call('/health')['integrations']=='fake'
# 1 GB per file: a 57 cm x 5 m sheet at 300 DPI is 200 to 300 MB.
assert config['max_upload_bytes'] == 1024 ** 3
# 4 GB per file (Dropstar, 2026-10-28).
assert config['max_upload_bytes'] == 4 * 1024 ** 3
client.call('/uploads',{'name':'too-large.cdr',
'size':config['max_upload_bytes']+1},expected=413)
cancelled=client.call('/uploads',{'name':'CANCELLED-PART.cdr','size':3})['id']