upto16char_filenamemax
This commit is contained in:
parent
e0db8ed91d
commit
fa9b904e00
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue