ESP8266 Web Server Upload Files Quick To SPIFFS Flash Memory Over HTTP w/ Arduino IDE

Поділитися
Вставка
  • Опубліковано 21 сер 2024
  • • $2 for PCB prototype (any color): jlcpcb.com/
    ==========
    • Your support helps me post videos more frequently:
    / acrobotic
    www.paypal.me/...
    buymeacoff.ee/...
    BTC: 1ZpLvgETofMuzCaKoq5XJZKSwe5UNkwLM
    ==========
    • Find me on:
    / acrobotic
    / acrobotic
    / acrobotic
    ==========
    • My shops:
    acrobotic.com/...
    amazon.com/sho...
    ==========
    • Description:
    In another video I set up the Arduino IDE to upload files to the Flash File System, SPIFFS, of the ESP8266 ( • ESP8266 Save Files To ... ). The problem is that the standard way of doing so takes a long time-in the order of minutes.
    In this video I go over how to upload firmware that will allow us to upload the files to flash memory (SPIFFS) over HTTP. This reduces the time that it takes to a matter of a few seconds. I also show how to quickly visualize the content of the Flash File System using a webpage!
    ==========
    • Related vids:
    ESP8266 Webserver Step-by-Step using Arduino: • ESP8266 Web Server Ste...
    ==========
    • Project parts:
    ACROBOTIC Development Board for ESP8266:
    acrobotic.com/...
    amzn.to/2dAZ1mW (affiliate)
    ==========
    • Project code:
    Firmware for the Arduino IDE:
    github.com/acr...
    ==========
    • Tutorials:
    Instructions for modifying the Arduino IDE:
    github.com/esp...
    More info about Flash Memory on the ESP8266:
    learn.acrobotic...
    Detailed guide for getting started with the ESP8266 Development Board:
    learn.acrobotic...
    ==========
    • Sponsor:
    This video was sponsored by JLCPCB.
    ==========
    • Music:
    Epidemic Sound (epidemicsound.com). Standard UA-cam License.
    ==========
    #ESP8266 #Arduino #Tutorial

КОМЕНТАРІ • 37

  • @petebowcott8348
    @petebowcott8348 4 роки тому +1

    Thanks for this, works just fine. It took me a while to get the curl command right, I initially made the mistake of not having path declared so I was trying this ... which to a novice like me looked OK, and of course the server just returned success ...
    curl -F "file=index.html" 192.168.1.198/upload
    rather than this
    curl -F "file=@$PWD/index.html" 192.168.1.198/upload
    it was quite hard to make out in the video, might just help another newbie like me to see it written out here ...
    Thanks yet again for really sweet clear examples!! It really is much appreciated!!
    Pete

    • @datasith
      @datasith  4 роки тому

      thanks so much, yeh, this vid is from my early days, and i'm still far from an expert in content creation. you're right, and it's something i'll work to improving in the future. thanks for posting it here!

    • @Dragonmastur24
      @Dragonmastur24 Рік тому

      okay 2 quick questions: What does the "@$PWD/" actually do or mean?
      And does curl work differently on windows power shell? I'm just getting an argument error

  • @boldadanac4815
    @boldadanac4815 4 роки тому

    AMAZING VIDEO MAN! I have been working with the Basic Websever tutorial and the FSBrowser but to have you talk it out helped so much!!!

    • @datasith
      @datasith  4 роки тому

      Thanks so much! Yeah, the FSBrowser example is great, but there's so much going on that it gets overwhelming IMO. I'm glad you found the info useful!

  • @nahuelvolpe4986
    @nahuelvolpe4986 3 роки тому

    THANK YOU! This video helped me a lot. Im working on an IoT App and this is what i needed.
    PD: NICE T-SHIRT! 💙🤍💙

  • @HamzaHajeir
    @HamzaHajeir 5 років тому +1

    Just nice video and i liked your way in explaining.. Continue the neat work (y)

    • @datasith
      @datasith  5 років тому

      Thanks, Hamza. It's been a learning process for me on how to make videos, so I'm glad you find them useful!

    • @HamzaHajeir
      @HamzaHajeir 5 років тому

      @@datasith Yeah, I am trying to mix the feature of informative and useful videos, alongside youtuber's follow-up and attention.
      So, I hope i can get hints for that.
      Thanks & Go ON !

  • @hichamtabech1816
    @hichamtabech1816 3 роки тому +1

    Really nice, is there away to upload a file from ipad?

  • @dishendra.
    @dishendra. 3 роки тому

    Man you are awesome 🔥

  • @rishabhlavhale3096
    @rishabhlavhale3096 2 роки тому

    Thank You for this work...

  • @proplayervor9jahren61
    @proplayervor9jahren61 4 роки тому +1

    the code also goes for the esp32. can you make a tutorial?

  • @rgmtb
    @rgmtb 5 років тому

    Great info!

  • @hirentejani6869
    @hirentejani6869 5 років тому

    Your tutorial is just Awesome.... you save my lost of day.. i want to ask just question. How we delete the old SPIFFS file of ESP8266 using same method or we delete some specific file of SPIFFs or how we write file from starting process because i want to save 1Mb file and every time file come with new name.
    Again Thank You so much for this tutorial.

    • @datasith
      @datasith  5 років тому

      Thanks! I have the code for deleting files on the video after this one. Here's the link:
      github.com/acrobotic/Ai_Demos_ESP8266/tree/master/webserver_jpeg_ws2812
      Thanks for watching my vids, I'm glad you found them useful!

  • @yusufhanafi1144
    @yusufhanafi1144 Рік тому

    can this method send csv files from Sdcard to our website?

  • @lybce
    @lybce Рік тому

    Hi all, i´m using ESPAsyncwebserver, when upload (JSON type) file some spurius chars appear and corrupt the file when i try to read it. Someone has same behaviour ?

  • @ChristhopherFreire
    @ChristhopherFreire 8 місяців тому

    increible pero ahora como lo elimino el dato subido

  • @rgmtb
    @rgmtb 5 років тому

    Wonderful video! Could you show how to add some basic security plz? Nothing special, just a password to see the list files and one to allow uploads. Very helpful video and thanks so much..

    • @datasith
      @datasith  5 років тому

      Thanks for watching! The easiest way is to use a password field on the page (HTML side), send it to a URL such as "/login" and then checking the URL arguments of the request on the ESP8266 side:
      if(password == "MySecretPassword")
      server.send( ... )
      HTH!

  • @GodzillazzZ
    @GodzillazzZ 5 років тому

    very nice info and toturial

    • @datasith
      @datasith  5 років тому

      Thank you for your kind comment, I'm happy that you found the info useful!

  • @federicokrum
    @federicokrum 5 років тому

    Hi !
    I have searched for a way to upload a textarea field of a HTML form as a file to the SPIFFS with no success.
    I am talking of a real large file, like 2.5 MB text.
    A tutorial on this will be much appreciated !!

    • @datasith
      @datasith  5 років тому

      Hmm, I'll add it to the queue. It's a little specific to make a full tutorial, but when I get around to it I'll make sure to let you know!

  • @korakotmanee6345
    @korakotmanee6345 5 років тому

    Do you know why curl command didn't work on win10 ?
    curl -F "file=@$PWD/index.html" 192.168.43.170/upload
    Warning: Illegally formatted input field!
    curl: option -F: is badly used here
    curl: try 'curl --help' for more information
    however it worked on Solaris10
    curl -F "file=@$PWD/index.html" 192.168.43.170/upload
    {"success":1}

    • @datasith
      @datasith  5 років тому

      I suspect some environment variables are different for windows. In this case "@$PWD". If you try the absolute path "C:\Users\USERNAME\...\index.html" it'll work. Thanks for your question, and for watching my vids!

  • @wei48221
    @wei48221 5 років тому

    Great job..

  • @fredrahmani6670
    @fredrahmani6670 3 роки тому

    Hi there, Great tutorial! Could you also show us how to list all the files in the SPIFFS system? Thanks

  • @syauqisabili3776
    @syauqisabili3776 5 років тому

    Great video!, i wanna ask u something. I have a website. and i wanna send image file to my website server. how to send image files to my website using a esp8266 nodemcu?. thanks

    • @datasith
      @datasith  5 років тому

      You're in luck, I made a video on how to do it:
      ua-cam.com/video/u_C7robY118/v-deo.html (code in the description as usual)

  • @federicokrum
    @federicokrum 5 років тому

    Can you add a form to just upload the file?
    Will be great instead of using curl.

    • @datasith
      @datasith  5 років тому

      Yup you can, pretty much anything that allows you to make the appropriate request works. A form definitely makes it self-contained within the browser! You can also use browser extensions instead, but your proposed method works well!

  • @avon9798
    @avon9798 5 років тому

    Sir can we create a download link from the nodemcu where the file is located in spiffs ?? like 192.168.1.2/upload/image.png ??

    • @datasith
      @datasith  4 роки тому +1

      yes, you can use the filestream function to do this. HTH!