fixfilename
This commit is contained in:
parent
ef1ba47787
commit
f1be71efef
2 changed files with 4 additions and 2 deletions
|
@ -121,7 +121,7 @@ textarea[name="description"] {
|
|||
flex-wrap: nowrap;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
margin: 20px 10px;
|
||||
margin: 23px 20px;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
document.getElementById('file-input').addEventListener('change', function() {
|
||||
const fileName = this.files[0] ? this.files[0].name : 'No file chosen';
|
||||
document.querySelector('.file-chosen').textContent = fileName;
|
||||
const truncatedFileName = fileName.length > 10 ? fileName.slice(0, 10) + '...' : fileName;
|
||||
document.querySelector('.file-chosen').textContent = truncatedFileName;
|
||||
});
|
||||
|
||||
|
||||
export async function processForm (e) {
|
||||
e.preventDefault();
|
||||
// const [name, description, image] = e.target[0,1,2]
|
||||
|
|
Loading…
Reference in a new issue