File attachments
Configure multipart uploads, enforce FormDex limits, and retrieve accepted files through authenticated submission records.
Availability and limits
Enable Settings › Protection › File attachments for each form. Both the active plan and the form-level toggle are enforced again when the request is accepted.
Native HTML
<form action="https://YOUR_FORMDEX_DOMAIN/api/forms/FORM_ID"
method="POST" enctype="multipart/form-data">
<input type="hidden" name="_api_key" value="YOUR_API_KEY" />
<input type="email" name="email" required />
<input type="file" name="attachments"
accept=".pdf,.jpg,.jpeg,.png" multiple />
<button type="submit">Send</button>
</form>Repeat the same field name or use one input with multiple. FormDex accepts file parts independently of the text-field schema.
JavaScript and React
const body = new FormData(form);
const response = await fetch(FORMDEX_ENDPOINT, {
method: "POST",
headers: { "X-API-Key": FORMDEX_API_KEY },
body,
});
// Do not set Content-Type manually; the browser adds the multipart boundary.
if (!response.ok) {
const result = await response.json();
throw new Error(result.message || result.error || "Upload failed");
}Delivery and retrieval
Accepted files remain private and are available only through an authorized FormDex account. Sign in, open the form’s Submissions tab, expand the submission, and use its Download action.
Webhook events and notification emails include filename, media type, and size only. They never include file contents or a public download link.
Retention
Starter files are retained for 30 days, Growth for 180 days, and Scale for 365 days from the accepted submission time. The effective expiry is shown in the submission inbox and is snapshotted at upload, so a later plan change does not shorten an already-promised retention period. Deleting a form removes its files earlier.
File safety
FormDex verifies the declared file type, checks the actual file signature, and applies automated safety screening before accepting an attachment.
If a file fails validation or safety checks, the submission is rejected without consuming a credit. Ask the sender to choose a valid PDF, JPG, or PNG file and try again.