Code Monkey home page Code Monkey logo

esp-idf-multipart-upload's Introduction

esp-idf-multipart-upload

A multipart file upload example for esp-idf.

Server Side

Download the server from here.


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.

menuconfig-1 menuconfig-2

WiFi Setting

menuconfig-3

HTTP Server Setting

menuconfig-4

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-stream

binary-data

--X-ESPIDF_MULTIPART--

esp-idf-multipart-upload's People

Contributors

nopnop2002 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

xinyukhan

esp-idf-multipart-upload's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.