PlatformIO Community

Adding/Uploading files to SPIFFS on ESP8266


#1

Hi,

I’m trying to customize the config portal of the WifiManager to give it a new and enhanced look. I read about adding/uploading image files to a “data” folder using the Arduino IDE, but not sure how to do it on PlatformIO.

Thanks


#2

It’s the same for PlatformIO. Files in the data/ folder will be converted to a SPIFFS image and you can upload it via the special target “Upload SPIFFS” in your IDE or pio run -t uploadfs. See http://docs.platformio.org/en/latest/platforms/espressif8266.html#uploading-files-to-file-system-spiffs


#3

Thank you very much for your continued support. I’ll give it a try and let you know! :slightly_smiling_face:


#4

By the way, do you suggest any specific location for “data” folder?


#5

From http://docs.platformio.org/en/latest/platforms/espressif8266.html#uploading-files-to-file-system-spiffs:

  • Create data folder (it should be on the same level as src folder) and put files here. Also, you can specify own location for data_dir

Also refer http://docs.platformio.org/en/latest/projectconf/section_platformio.html#projectconf-pio-data-dir


#6

That was very helpful and I’m reading the instructions now!
Thank you again!


#7

Could you please refer me to the docs where I can read more about running tasks in the IDE cause I didn’t find a way to run “Upload File System image” task in PlatformIO IDE.

Also, for CLI command, please let me know if the following does the job:
platformio run --uploadfs

Thx

*** UPDATE ***
Sorry for confusion. Just found it!


#8

See http://docs.platformio.org/en/latest/ide/vscode.html#project-tasks