From fa9b904e008a21810c14d224b0c38c12bcdf7d2a Mon Sep 17 00:00:00 2001 From: scossa Date: Wed, 21 Aug 2024 01:24:06 +0200 Subject: [PATCH] upto16char_filenamemax --- public/js/formHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/formHandler.js b/public/js/formHandler.js index 884577f..df78694 100644 --- a/public/js/formHandler.js +++ b/public/js/formHandler.js @@ -1,6 +1,6 @@ document.getElementById('file-input').addEventListener('change', function() { const fileName = this.files[0] ? this.files[0].name : 'No file chosen'; - const truncatedFileName = fileName.length > 10 ? fileName.slice(0, 10) + '...' : fileName; + const truncatedFileName = fileName.length > 16 ? fileName.slice(0, 16) + '...' : fileName; document.querySelector('.file-chosen').textContent = truncatedFileName; });