feat: accept sheets of up to 5 GB end to end
Some checks failed
Build and deploy / Validate source (push) Successful in 12s
Build and deploy / Integration suite on a real stack (push) Failing after 2m36s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Has been skipped
Some checks failed
Build and deploy / Validate source (push) Successful in 12s
Build and deploy / Integration suite on a real stack (push) Failing after 2m36s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Has been skipped
Sheets of several GB are the normal order. The upload limit is now 5 GB. ClamAV scans files up to 2 GB; a larger file is released only when its first bytes match the format its name claims, and a disguised file is refused. The Site grades a sheet over 150 MB from the pixel size in its PNG, JPEG or WebP header without decoding it, and reads large PDFs in ranges. The worker never opens a source over 300 MB: a finished sheet placed whole becomes its own print file, which the Kanban offers to approve as the final, and anything else goes to hand preparation. Files start uploading as they enter the cart, with progress in the summary, and each part renews the reservation so slow uploads do not expire. Quotas grow to 50 GB per customer and 500 GB in total; the Swarm config for ClamAV is renamed because a deployed config cannot change in place. Verified locally with a 386 MB and a 1.8 GB PNG (scanned, paid, original as print file), a 2.3 GB PNG (format check) and a disguised 2.3 GB file (refused). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -37,14 +37,13 @@ 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||128*1048576;
|
||||
const max=window.dtfUploadMaxBytes||5*1073741824;
|
||||
const grandes=fs.filter(f=>f.size>max);
|
||||
if(grandes.length){
|
||||
const el=$('recusa');
|
||||
el.style.display='block';
|
||||
el.innerHTML='<b>Arquivo acima do limite de '+(max/1048576).toFixed(0)+
|
||||
' MB.</b> A verificação de segurança ainda não consegue liberar arquivos maiores. '+
|
||||
'Divida ou compacte a arte antes de enviar.';
|
||||
el.innerHTML='<b>Arquivo acima do limite de '+(max/1073741824).toFixed(0)+
|
||||
' GB.</b> Divida a folha em partes menores antes de enviar.';
|
||||
fs=fs.filter(f=>f.size<=max);
|
||||
}
|
||||
if(!fs.length) return;
|
||||
@@ -75,12 +74,21 @@ function sel(fs){
|
||||
}
|
||||
if(md && md.dpiFolha!=null && md.dpiFolha<DPI_RECUSA) return recusaFolha(x, md);
|
||||
x.med=md; if(md) x.m=md.alt/100; x.pct=55; pintaFolha();
|
||||
if(md && RENDERIZA.test(x.f.name)){
|
||||
if(md && md.grande){
|
||||
// Graded from its size in pixels; the pieces, gaps and background
|
||||
// are checked by the team, since the image is never opened here.
|
||||
x.an={dpi:md.dpiFolha, grande:true, artes:0, residuos:0, encostadas:0,
|
||||
fundoChapado:false, aproveitamento:0, alturaCm:md.alt, fonteDpi:'arquivo'};
|
||||
x.pct=null; pintaFolha();
|
||||
}else if(md && RENDERIZA.test(x.f.name)){
|
||||
carregarImagem(x.f).then(img=>{
|
||||
if(img){ x.previewSrc=img.src; try{ x.an=analisarFolha(img, md.larg); if(x.an) x.an.fonteDpi='arquivo'; }
|
||||
catch(e){} }
|
||||
x.pct=null; pintaFolha();
|
||||
});
|
||||
}else if(md && /\.pdf$/i.test(x.f.name) && x.f.size>GRANDE_BYTES){
|
||||
x.semAnalise='PDF grande: a resolução das imagens de dentro é conferida pela equipe';
|
||||
x.pct=null; pintaFolha();
|
||||
}else if(md && /\.pdf$/i.test(x.f.name)){
|
||||
x.pct=70; pintaFolha();
|
||||
rasterizarPdf(x.f, md.larg, md.alt).then(r=>{
|
||||
|
||||
Reference in New Issue
Block a user