ESP32 upload to SPIFFS

i have a webserver on my esp32 spiffs, how could i upload a file to the spiffs without disturbing the existing filesystem. I would like upload a zip of the sketch that is running so i can pull it from the device if i ever lose it. i upload the firmware through http fileupload dialog, how could i detect and save it somewhere data is not already written to?

OR, could i change some script for arduino ide to include a copy of the sketch folder into the data folder automatically? i prefer the first

actually i think it might be better to use ide method. if a change happens to the sketch then, on compile make a zip of sketch folder called could i invoke a program like winrar to run a console command when the verify button in ide is pressed? could this be possible?

This may be what you are looking for.

1 Like

I already use the filesystem uploader tool for Arduino ide and it works nicely. i have Arduino ide put the compiled sketch and filesysten in "c:\arduino temp" because i mostly use OTA and its easier to access from there.

What script runs when the verify button on ide its pressed? is there something i could modify and add a line of code like "winrar.exe -compress \sketch -destination \c:\documents\arduino \sketchfolder\data\firmware.rar" that way every time i compile my code a firmware.rar is created in the sketch data folder?

i found this but i was looking for something simpler it would be easier to just remember to replace firmware.rar with the updated stable one

I do have a lot of problems with ide when writing sketches. if I resize the windows or change the font size by holding ctrl and using the mouse wheel my code start to disappear. it starts with the brackets not showing up and gets worse and worse.

i even had it ruin a sketch before. When I notice it I immediately restart ide completely. it don't help to just close the window with the issue. If I don't change the font size or window size it don't seem to be an issue

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.