https://github.com/nopnop2002/esp-idf-multipart-upload
A multipart file upload example for esp-idf
https://github.com/nopnop2002/esp-idf-multipart-upload
esp-idf esp32 flask multipart multipart-uploads tornado
Last synced: 3 months ago
JSON representation
A multipart file upload example for esp-idf
- Host: GitHub
- URL: https://github.com/nopnop2002/esp-idf-multipart-upload
- Owner: nopnop2002
- License: mit
- Created: 2020-11-19T20:17:16.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-07T20:40:02.000Z (over 1 year ago)
- Last Synced: 2025-02-28T19:53:16.331Z (3 months ago)
- Topics: esp-idf, esp32, flask, multipart, multipart-uploads, tornado
- Language: C
- Homepage:
- Size: 93.8 KB
- Stars: 15
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# esp-idf-multipart-upload
A multipart file upload example for esp-idf.# Server Side
Download the server from [here](https://github.com/nopnop2002/multipart-upload-server).---
# ESP32 Side
## Software requirements
ESP-IDF V4.4/V5.x.
ESP-IDF V5.0 is required when using ESP32-C2.
ESP-IDF V5.1 is required when using ESP32-C6.## Installation
```
git clone https://github.com/nopnop2002/esp-idf-multipart-upload
cd esp-idf-multipart-upload/
idf.py set-target {esp32/esp32s2/esp32s3/esp32c2/esp32c3}
idf.py menuconfig
idf.py flash
```## Configuration
You have to set this config value with menuconfig.
- CONFIG_ESP_WIFI_SSID
SSID of your wifi.
- CONFIG_ESP_WIFI_PASSWORD
PASSWORD of your wifi.
- CONFIG_ESP_MAXIMUM_RETRY
Maximum number of retries when connecting to wifi.
- CONFIG_ESP_WEB_SERVER
IP address or mDNS host name of your WEB Server.
- CONFIG_ESP_WEB_PORT
Port number of your WEB Server.
- CONFIG_ESP_WEB_PATH
Path of your WEB Server.
## WiFi Setting
## HTTP Server Setting

## About multipart/form-data
This example send this HTTP header.
If the parameter expected by the server is not "upfile", you need to change it.
```
POST PATH HTTP/1.1
HOST: HOST:PORT
User-Agent: esp-idf/X.Y.Z esp32
Accept: */*
Content-Type: multipart/form-data; boundary=X-ESPIDF_MULTIPART
Content-Length: xxx--X-ESPIDF_MULTIPART
Content-Disposition: form-data; name="upfile"; filename="hoge.jpg"
Content-Type: Content-Type: application/octet-streambinary-data
--X-ESPIDF_MULTIPART--
```