2016-10-20 20:30:53 +02:00
|
|
|
+++
|
2016-11-17 08:46:00 +02:00
|
|
|
title = "File Upload Example"
|
|
|
|
description = "File upload example for Echo"
|
2016-11-21 00:16:22 +02:00
|
|
|
[menu.main]
|
2016-10-20 20:30:53 +02:00
|
|
|
name = "File Upload"
|
|
|
|
parent = "recipes"
|
|
|
|
weight = 7
|
|
|
|
+++
|
|
|
|
|
2016-11-17 08:46:00 +02:00
|
|
|
## How to upload single file with fields?
|
2016-10-20 20:30:53 +02:00
|
|
|
|
2016-11-17 08:46:00 +02:00
|
|
|
### Server
|
2016-10-20 20:30:53 +02:00
|
|
|
|
|
|
|
`server.go`
|
|
|
|
|
|
|
|
{{< embed "file-upload/single/server.go" >}}
|
|
|
|
|
2016-11-17 08:46:00 +02:00
|
|
|
### Client
|
2016-10-20 20:30:53 +02:00
|
|
|
|
|
|
|
`index.html`
|
|
|
|
|
|
|
|
{{< embed "file-upload/single/public/index.html" >}}
|
|
|
|
|
2016-11-17 08:46:00 +02:00
|
|
|
## How to upload multiple files with fields?
|
2016-10-20 20:30:53 +02:00
|
|
|
|
2016-11-17 08:46:00 +02:00
|
|
|
### Server
|
2016-10-20 20:30:53 +02:00
|
|
|
|
|
|
|
`server.go`
|
|
|
|
|
|
|
|
{{< embed "file-upload/multiple/server.go" >}}
|
|
|
|
|
2016-11-17 08:46:00 +02:00
|
|
|
### Client
|
2016-10-20 20:30:53 +02:00
|
|
|
|
|
|
|
`index.html`
|
|
|
|
|
|
|
|
{{< embed "file-upload/multiple/public/index.html" >}}
|
|
|
|
|
2016-11-17 08:46:00 +02:00
|
|
|
## Source Code
|
2016-10-20 20:30:53 +02:00
|
|
|
|
|
|
|
- [single]({{< source "file-upload/single" >}})
|
|
|
|
- [multiple]({{< source "file-upload/multiple" >}})
|
2016-11-17 09:05:37 +02:00
|
|
|
|
|
|
|
## Maintainers
|
|
|
|
|
|
|
|
- [vishr](https://github.com/vishr)
|