feat: make Docker container port configurable via PORT env var

fix: preserve original filename when downloading processed files
This commit is contained in:
alam00000
2026-04-05 13:44:16 +05:30
parent 2f0d48c01b
commit bfe4e5b663
77 changed files with 127 additions and 126 deletions

View File

@@ -65,6 +65,7 @@ let pages: PageData[] = [];
let currentPageIndex = 0;
let uploadedPdfDoc: PDFDocument | null = null;
let uploadedPdfjsDoc: PDFDocumentProxy | null = null;
let uploadedFileName: string | null = null;
let pageSize: { width: number; height: number } = { width: 612, height: 792 };
let currentScale = 1.333;
let pdfViewerOffset = { x: 0, y: 0 };
@@ -2717,7 +2718,7 @@ downloadBtn.addEventListener('click', async () => {
const blob = new Blob([new Uint8Array(pdfBytes)], {
type: 'application/pdf',
});
downloadFile(blob, 'fillable-form.pdf');
downloadFile(blob, uploadedFileName || 'document.pdf');
showModal(
'Success',
'Your PDF has been downloaded successfully.',
@@ -3141,6 +3142,7 @@ async function handlePdfUpload(file: File) {
const arrayBuffer = result.bytes;
uploadedPdfjsDoc = result.pdf;
uploadedPdfDoc = await loadPdfDocument(arrayBuffer);
uploadedFileName = file.name;
// Check for existing fields and update counter
existingFieldNames.clear();