Form Unggah Konten
form.addEventListener('submit', function(event) { event.preventDefault(); const formData = new FormData(form);
fetch('/upload/content', {
method: 'POST',
body: formData
})
.then(response => response.text())
.then(message => {
alert(message);
form.reset();
})
.catch(error => console.error('Error:', error));
});