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
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
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!
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
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!!!
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!
THANK YOU! This video helped me a lot. Im working on an IoT App and this is what i needed.
PD: NICE T-SHIRT! 💙🤍💙
Just nice video and i liked your way in explaining.. Continue the neat work (y)
Thanks, Hamza. It's been a learning process for me on how to make videos, so I'm glad you find them useful!
@@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 !
Really nice, is there away to upload a file from ipad?
Man you are awesome 🔥
Thank You for this work...
the code also goes for the esp32. can you make a tutorial?
Great info!
Thank you!
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.
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!
can this method send csv files from Sdcard to our website?
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 ?
increible pero ahora como lo elimino el dato subido
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..
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!
very nice info and toturial
Thank you for your kind comment, I'm happy that you found the info useful!
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 !!
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!
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}
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!
Great job..
Thank you!
Hi there, Great tutorial! Could you also show us how to list all the files in the SPIFFS system? Thanks
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
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)
Can you add a form to just upload the file?
Will be great instead of using curl.
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!
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 ??
yes, you can use the filestream function to do this. HTH!