Import large activity Excel in the browser via JSON chunks to avoid 502.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -102,6 +102,22 @@ export function createExcelImportSession(
|
||||
return id;
|
||||
}
|
||||
|
||||
/** فقط کش lookup برای ایمپورت JSON تکهای از مرورگر (بدون نگه داشتن کل فایل) */
|
||||
export function createExcelImportCacheSession(organizationId: string): string {
|
||||
purgeExpired();
|
||||
const id = randomBytes(16).toString('hex');
|
||||
sessions.set(id, {
|
||||
organizationId,
|
||||
rows: [],
|
||||
expiresAt: Date.now() + SESSION_TTL_MS,
|
||||
caches: emptyCaches(),
|
||||
status: 'ready',
|
||||
total: 0,
|
||||
parsed: 0,
|
||||
});
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* آپلود را فوری قبول میکند و پارس را در پسزمینه انجام میدهد
|
||||
* تا پروکسی nginx با ۵۰۲ قطع نکند.
|
||||
|
||||
Reference in New Issue
Block a user