fix: chunked base64 encoding to avoid JS argument overflow — v1.2
Deploy contracts-flask / validate (push) Successful in 0s

This commit is contained in:
2026-06-29 17:57:07 +04:00
parent 2197b7e526
commit 6cedab89ae
3 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ DrHider — обфускация документов (двухпроходна
Согласованность: одна и та же сущность во всех файлах → одно и то же фиктивное значение. Согласованность: одна и та же сущность во всех файлах → одно и то же фиктивное значение.
""" """
DRHIDER_VERSION = "1.1" DRHIDER_VERSION = "1.2"
import io import io
import csv import csv
import re import re
+1 -1
View File
@@ -6,7 +6,7 @@ DrHider — обфускация документов (двухпроходна
Согласованность: одна и та же сущность во всех файлах → одно и то же фиктивное значение. Согласованность: одна и та же сущность во всех файлах → одно и то же фиктивное значение.
""" """
DRHIDER_VERSION = "1.1" DRHIDER_VERSION = "1.2"
import io import io
import csv import csv
import re import re
+7 -2
View File
@@ -64,7 +64,7 @@
<a href="/">Сверка договоров</a> <a href="/">Сверка договоров</a>
<span class="sep">|</span> <span class="sep">|</span>
<strong>DrHider</strong> <strong>DrHider</strong>
<span style="font-size:11px;color:var(--muted);">v1.1</span> <span style="font-size:11px;color:var(--muted);">v1.2</span>
</header> </header>
<main> <main>
@@ -126,7 +126,12 @@ BTN.onclick = async () => {
const payload = []; const payload = [];
for (const f of files) { for (const f of files) {
const buf = await f.arrayBuffer(); const buf = await f.arrayBuffer();
const b64 = btoa(String.fromCharCode(...new Uint8Array(buf))); const bytes = new Uint8Array(buf);
let b64 = '';
for (let i = 0; i < bytes.length; i += 8192) {
b64 += String.fromCharCode.apply(null, bytes.slice(i, i + 8192));
}
b64 = btoa(b64);
payload.push({name: f.name, data: b64, type: f.type || ''}); payload.push({name: f.name, data: b64, type: f.type || ''});
} }
setStatus('progress', '⏳ Обработка... 0с'); setStatus('progress', '⏳ Обработка... 0с');