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
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:
@@ -52,7 +52,7 @@ TINY_ADAPTER=fake
|
||||
# SMTP_PASSWORD=...
|
||||
STORAGE_ADAPTER=s3-local
|
||||
MOCK_FREIGHT_CENTS=1500
|
||||
MAX_UPLOAD_BYTES=1073741824
|
||||
MAX_UPLOAD_BYTES=4294967296
|
||||
UPLOAD_PART_BYTES=8388608
|
||||
STORAGE_QUOTA_BYTES=53687091200
|
||||
OWNER_UPLOAD_QUOTA_BYTES=10737418240
|
||||
|
||||
@@ -10,4 +10,4 @@ def scan_limit_bytes():
|
||||
|
||||
|
||||
def upload_limit_bytes():
|
||||
return int(os.environ.get('MAX_UPLOAD_BYTES', '1073741824'))
|
||||
return int(os.environ.get('MAX_UPLOAD_BYTES', str(4 * 1024 ** 3)))
|
||||
|
||||
@@ -91,12 +91,12 @@ x-app: &app
|
||||
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
|
||||
STORAGE_ADAPTER: s3-local
|
||||
MOCK_FREIGHT_CENTS: ${MOCK_FREIGHT_CENTS:-1500}
|
||||
MAX_UPLOAD_BYTES: ${MAX_UPLOAD_BYTES:-1073741824}
|
||||
MAX_UPLOAD_BYTES: ${MAX_UPLOAD_BYTES:-4294967296}
|
||||
UPLOAD_PART_BYTES: ${UPLOAD_PART_BYTES:-8388608}
|
||||
STORAGE_QUOTA_BYTES: ${STORAGE_QUOTA_BYTES:-53687091200}
|
||||
OWNER_UPLOAD_QUOTA_BYTES: ${OWNER_UPLOAD_QUOTA_BYTES:-10737418240}
|
||||
MAX_PENDING_UPLOADS: ${MAX_PENDING_UPLOADS:-10}
|
||||
SCAN_MAX_BYTES: ${SCAN_MAX_BYTES:-1073741824}
|
||||
SCAN_MAX_BYTES: ${SCAN_MAX_BYTES:-2097152000}
|
||||
networks: [local]
|
||||
init: true
|
||||
security_opt: [no-new-privileges:true]
|
||||
|
||||
@@ -56,7 +56,7 @@ SMTP_PASSWORD=TBD
|
||||
STORAGE_QUOTA_BYTES=TBD
|
||||
OWNER_UPLOAD_QUOTA_BYTES=TBD
|
||||
MAX_PENDING_UPLOADS=10
|
||||
MAX_UPLOAD_BYTES=1073741824
|
||||
MAX_UPLOAD_BYTES=4294967296
|
||||
UPLOAD_PART_BYTES=8388608
|
||||
SCAN_MAX_BYTES=134217728
|
||||
# Daily encrypted database backup to its own bucket (docs/BACKUP.md).
|
||||
|
||||
@@ -132,17 +132,17 @@ x-app-environment: &app-environment
|
||||
ALLOWED_HOSTS: ${SITE_DOMAIN:?set SITE_DOMAIN},${KANBAN_DOMAIN:?set KANBAN_DOMAIN}
|
||||
ALLOWED_ORIGINS: https://${SITE_DOMAIN:?set SITE_DOMAIN},https://${KANBAN_DOMAIN:?set KANBAN_DOMAIN}
|
||||
COOKIE_SECURE: "true"
|
||||
# 1 GB per file (Dropstar, 2026-10-21): a 57 cm x 5 m sheet at 300 DPI is
|
||||
# 200 to 300 MB, and much more takes an hour to send on a common connection.
|
||||
MAX_UPLOAD_BYTES: "1073741824"
|
||||
# 4 GB per file (Dropstar, 2026-10-28; it was 5 GB, then 1 GB from 2026-10-21).
|
||||
MAX_UPLOAD_BYTES: "4294967296"
|
||||
UPLOAD_PART_BYTES: "8388608"
|
||||
# Sheets of several GB are the normal order, so room for many of them.
|
||||
STORAGE_QUOTA_BYTES: "${STORAGE_QUOTA_BYTES:-536870912000}"
|
||||
OWNER_UPLOAD_QUOTA_BYTES: "${OWNER_UPLOAD_QUOTA_BYTES:-53687091200}"
|
||||
MAX_PENDING_UPLOADS: "10"
|
||||
# ClamAV scans up to this, so every file up to MAX_UPLOAD_BYTES is scanned;
|
||||
# a larger one would be released after a file-format check (app/scanning.py).
|
||||
SCAN_MAX_BYTES: "1073741824"
|
||||
# ClamAV scans up to its own limit, 2000 MiB (infra/clamd.conf); a larger
|
||||
# file, up to the 4 GB above, is released after the file-format check
|
||||
# (app/scanning.py, check_large).
|
||||
SCAN_MAX_BYTES: "2097152000"
|
||||
|
||||
services:
|
||||
db:
|
||||
|
||||
@@ -387,7 +387,8 @@ the machine form); a linked operator sees only those machines' orders.
|
||||
|
||||
Dropstar's corrections of 2026-10-21 already done: the home example priced as
|
||||
a ready sheet; opening hours 7h to 18h with "send your art any time"; uploads
|
||||
up to 1 GB (MAX_UPLOAD_BYTES, scanned whole by ClamAV); a Designer profile
|
||||
up to 1 GB (MAX_UPLOAD_BYTES; Dropstar moved it to 4 GB on 2026-10-28: ClamAV scans
|
||||
up to its 2000 MiB, a larger file passes by the format check); a Designer profile
|
||||
(artwork stages only, every order, no machine, queue or cancelling; MOVES
|
||||
in app/core/auth.py, the "print" capability for the room's side); Números by date range, per machine (metres finished, metres per hour
|
||||
in Imprimindo, last finished, now) and orders apart from passages. A machine's
|
||||
|
||||
@@ -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]);
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -839,7 +839,7 @@ h2 em{font-style:normal;color:var(--laranja)}
|
||||
<div class="zona" id="zona" tabindex="0" role="button">
|
||||
<div class="ico"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m17 8-5-5-5 5"/><path d="M12 3v12"/></svg></div>
|
||||
<b id="zTit">Arraste aqui</b><span id="zSub"></span>
|
||||
<span id="zLimite">Até 1 GB por arquivo.</span>
|
||||
<span id="zLimite">Até 4 GB por arquivo.</span>
|
||||
<span class="bt">ou escolher no computador</span>
|
||||
<span class="zOutra"><b id="zOutra">Adicionar outra folha</b> ou arraste aqui</span>
|
||||
<span class="zManual" id="zManual">Tem <b>CDR, AI, PSD ou TIFF</b>? Pode mandar também.
|
||||
|
||||
@@ -74,7 +74,7 @@ async function sel(fs){
|
||||
const fora = fs.filter(f=>!regra.test(f.name));
|
||||
fs = fs.filter(f=>regra.test(f.name));
|
||||
recusa(fora);
|
||||
const max=window.dtfUploadMaxBytes||1073741824;
|
||||
const max=window.dtfUploadMaxBytes||4294967296;
|
||||
const grandes=fs.filter(f=>f.size>max);
|
||||
if(grandes.length){
|
||||
const el=$('recusa');
|
||||
|
||||
Reference in New Issue
Block a user