--- description: | Robustly handle user inputs using HTML `
> ); } ``` When the user submits the form, Deno will retrieve the `email` value using the request's `formData()` method, add the email to a list, and redirect the user to a thank you page. ## Handling file uploads File uploads can be handled in a very similar manner to the example above. Note that this time, we have to explicitly declare the form's encoding to be `multipart/form-data`. ```tsx routes/subscribe.tsx import { Handlers, type PageProps } from "$fresh/server.ts"; interface Props { message: string | null; } export const handler: Handlers{message}
: null} > ); } ``` ## A note of caution These examples are simplified to demonstrate how Deno and Fresh handle HTTP requests. In the Real World™, you'll want to validate your data (_especially the file type_) and protect against cross-site request forgery. Consider yourself warned.