File Uploads
Uploads are Easy with Basin
Last updated
<input type="file"
name="avatar[]"
accept="image/webp, image/png, image/jpeg"
multiple><script>
// Get the closest form element relative to the script tag
const scriptTag = document.currentScript;
const formContainer = scriptTag.closest('form');
if (formContainer) {
formContainer.setAttribute('enctype', 'multipart/form-data');
}
</script>