upto21char_filename
This commit is contained in:
parent
fa9b904e00
commit
9d5a7f8b71
1 changed files with 1 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
document.getElementById('file-input').addEventListener('change', function() {
|
document.getElementById('file-input').addEventListener('change', function() {
|
||||||
const fileName = this.files[0] ? this.files[0].name : 'No file chosen';
|
const fileName = this.files[0] ? this.files[0].name : 'No file chosen';
|
||||||
const truncatedFileName = fileName.length > 16 ? fileName.slice(0, 16) + '...' : fileName;
|
const truncatedFileName = fileName.length > 21 ? fileName.slice(0, 21) + '...' : fileName;
|
||||||
document.querySelector('.file-chosen').textContent = truncatedFileName;
|
document.querySelector('.file-chosen').textContent = truncatedFileName;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue