diff --git a/public/css/map.css b/public/css/map.css index cf86c13..de227b2 100644 --- a/public/css/map.css +++ b/public/css/map.css @@ -121,7 +121,7 @@ textarea[name="description"] { flex-wrap: nowrap; align-items: flex-start; gap: 10px; - margin: 20px 10px; + margin: 23px 20px; } diff --git a/public/js/formHandler.js b/public/js/formHandler.js index dcbfbd5..884577f 100644 --- a/public/js/formHandler.js +++ b/public/js/formHandler.js @@ -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]