Submitting a form with an file attachment
In this example, we demonstrate how to submit a form that includes a file attachment using the OneEntry API.
✅ Purpose of the scenario:
- Get form configuration from OneEntry Platform
- The user fills out a form (e.g. response, feedback).
- Attaches a file (image, resume, document).
- The data and file are stored together in FormData
- Submit the collected data to an OneEntry API.
✅ What you need:
- A valid PROJECT_URL and APP_TOKEN for authentication with the OneEntry API.
- Form in OneEntry with a field of type "File" (type file)
- Form marker (eg resume_form)
📌 Important:
- These examples do not include error handling.
- You can manage errors using a try-catch block or by employing a construction like await Promise.catch((error) => error).
Loading sandbox…
