Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown fixes #1119

Merged
merged 1 commit into from
Jul 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/Tutorials/Misc/UploadFiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ The following HTML is an example of a `<form>` for a simple sign-up flow. Here t
The inputs will be POSTed to the server, and accessible via the [web event](../../WebEvent)'s `.Data` and `.Files`.

For the `.Data`:

```powershell
$WebEvent.Data['username'] # the username entered
$WebEvent.Data['password'] # the password entered
$WebEvent.Data['avatar'] # the name of the file (assume image.png)
```

For the `.Files`:

```powershell
$WebEvent.Files['image.png'] # the bytes of the uploaded file
```
Expand All @@ -60,7 +62,6 @@ If you use the `multiple` property then all the file names will be available und

You can upload files from the CLI by using `Invoke-WebRequest` (or `Invoke-RestMethod`), and to do so you'll need to pass the `-Form` parameter. Assuming you have the following Route to save some "avatar" file:


```powershell
Start-PodeServer {
Add-PodeEndpoint -Address * -Port 8085 -Protocol Http
Expand Down