Links

File Uploads 📝

// Some code
<form accept-charset="UTF-8" action="https://usebasin.com/f/1a2b3c4d5e6f" enctype="multipart/form-data" method="POST">
...
<input type="file" name="resume" ></input>
...
</form>
Concept...
  • Form-
    • Configure for basin
    • Place e.g. the basin URL in action
  • Drop a standard input field
    • Tag it [wfu-form-field-file]=
    • Name becomes the name of the file
    • [wfu-form-field-multiple]
  • Place e.g. the basin URL in action
Internally we;
  • Form-
    • Add enctype="multipart/form-data" to the form
    • Ensure it is POST
    • Verify Basin URL is a legit basin URL, warn otherwise
  • Field
    • Type = file
    • multiple option and []
// Some code
<form accept-charset="UTF-8" action="https://usebasin.com/f/1a2b3c4d5e6f" enctype="multipart/form-data" method="POST">
...
<input type="file" name="attachments[]" multiple></input>
...
</form>
Ideally we want to make this handler-agnostic, so we add a form-setup feature to handlers, and a form-validate feature
​
You must include a parameter enctype=“multipart/form-data” in your form element, otherwise it will not submit the file as a file but only the filename.
Last modified 5mo ago