{"id":75765,"date":"2022-04-14T09:53:00","date_gmt":"2022-04-14T09:53:00","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=75765"},"modified":"2024-05-10T09:53:14","modified_gmt":"2024-05-10T09:53:14","slug":"install-esp32-filesystem-uploader-arduino-ide","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/install-esp32-filesystem-uploader-arduino-ide\/","title":{"rendered":"Install ESP32 Filesystem Uploader in Arduino IDE"},"content":{"rendered":"\n<p>The ESP32 contains a Serial Peripheral Interface Flash File System (SPIFFS). SPIFFS is a lightweight filesystem created for microcontrollers with a flash chip, which is connected by SPI bus, like the ESP32 flash memory. In this article we\u2019re going to show how to easily upload files to the ESP32 filesystem using a plugin for Arduino IDE.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Install-ESP32-Filesystem-Uploader-Arduino-IDE.jpg?resize=1024%2C576&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Install ESP32 Filesystem Uploader in Arduino IDE\" class=\"wp-image-110412\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Install-ESP32-Filesystem-Uploader-Arduino-IDE.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Install-ESP32-Filesystem-Uploader-Arduino-IDE.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Install-ESP32-Filesystem-Uploader-Arduino-IDE.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Install-ESP32-Filesystem-Uploader-Arduino-IDE.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p class=\"rntbox rntcred\">Using Arduino IDE 2.0? Follow this tutorial instead: <a style=\"font-weight: 600; letter-spacing: 0.1px; white-space-collapse: collapse; background-color: transparent; border: 0px; margin: 0px; padding: 0px; transition: color 0.1s ease-in-out 0s, background-color 0.1s ease-in-out 0s; box-sizing: border-box; box-shadow: none; line-height: 1.2em;\" href=\"https:\/\/randomnerdtutorials.com\/arduino-ide-2-install-esp32-littlefs\/\">Arduino IDE 2: Install ESP32 LittleFS Uploader (Upload Files to the Filesystem)<\/a><\/p>\n\n\n\n<p class=\"rntbox rntclblue\"><strong>Note: <\/strong> if you have an ESP8266 board, read: <a href=\"https:\/\/randomnerdtutorials.com\/install-esp8266-nodemcu-littlefs-arduino\/\">Install ESP8266 NodeMCU LittleFS Filesystem Uploader in Arduino IDE<\/a>.<\/p>\n\n\n\n<p>If you&#8217;re using VS Code with the PlatformIO extension, read the following tutorial instead:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-vs-code-platformio-spiffs\/\">ESP32 with VS Code and PlatformIO: Upload Files to Filesystem (SPIFFS)<\/a><\/li>\n<\/ul>\n\n\n\n<p><strong>Table of Contents<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#spiffs-intro\">Introducing SPIFFS<\/a><\/li>\n\n\n\n<li><a href=\"#installing\">Installing the Arduino ESP32 Filesystem Uploader<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#installing-windows\">Windows Instructions<\/a><\/li>\n\n\n\n<li><a href=\"#macos-installing\">MacOS X Instructions<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#upload-files\">Uploading Files using the Filesystem Uploader<\/a><\/li>\n\n\n\n<li><a href=\"#testing-uploader\">Testing the Uploader<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"spiffs-intro\">Introducing SPIFFS<\/h2>\n\n\n\n<p>SPIFFS lets you access the flash memory like you would do in a normal filesystem in your computer, but simpler and more limited. You can read, write, close, and delete files. At the time of writing this post, SPIFFS doesn\u2019t support directories, so everything is saved on a flat structure.<\/p>\n\n\n\n<p>Using SPIFFS with the <a aria-label=\"ESP32 board (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/esp32-dev-board-wi-fi-bluetooth\/\" target=\"_blank\" rel=\"noreferrer noopener\">ESP32 board<\/a> is especially useful to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create configuration files with settings;<\/li>\n\n\n\n<li>Save data permanently;<\/li>\n\n\n\n<li>Create files to save small amounts of data instead of using a microSD card;<\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-web-server-spiffs-spi-flash-file-system\/\">Save HTML and CSS files to build a web server<\/a>;<\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/display-images-esp32-esp8266-web-server\/\">Save images, figures, and icons<\/a>;<\/li>\n\n\n\n<li>And much more.<\/li>\n<\/ul>\n\n\n\n<p>With SPIFFS, you can write the HTML and CSS in separate files and save them on the ESP32 filesystem. Check the following tutorial to learn how to build a web server with files stored on the ESP32 file system:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-web-server-spiffs-spi-flash-file-system\/\">ESP32 Web Server using SPIFFS (SPI Flash File System)<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing\">Installing the Arduino ESP32 Filesystem Uploader<\/h2>\n\n\n\n<p>You can create, save and write files to the ESP32 filesystem by writing the code yourself on the Arduino IDE. This is not very useful, because you&#8217;d have to type the content of your files in the Arduino sketch.<\/p>\n\n\n\n<p>Fortunately, there is a plugin for the Arduino IDE that allows you to upload files directly to the ESP32 filesystem from a folder on your computer. This makes it really easy and simple to work with files. Let\u2019s install it.<\/p>\n\n\n\n<p class=\"rntbox rntcred\"><strong>Note: <\/strong> at the time of writing this post, the ESP32 Filesystem Uploader plugin is not supported on Arduino 2.0.<\/p>\n\n\n\n<p>First, make sure you have the ESP32 add-on for the Arduino IDE. If you don&#8217;t, follow the next tutorial:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/installing-the-esp32-board-in-arduino-ide-windows-instructions\/\"><strong>Windows, Mac, and Linux<\/strong>\u00a0instructions \u2013 Installing the ESP32 Board in Arduino IDE<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-windows\">Windows Instructions<\/h3>\n\n\n\n<p>Follow the next steps to install the filesystem uploader if you&#8217;re using Windows:<\/p>\n\n\n\n<p><strong>1)<\/strong> Go to the <a href=\"https:\/\/github.com\/me-no-dev\/arduino-esp32fs-plugin\/releases\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">releases page and click the ESP32FS-1.0.zip<\/a> file to download.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"657\" height=\"324\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/ESP32-SPIFFS-Download-installer.png?resize=657%2C324&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Download ESP32 SPIFFS Filesystem fs for Arduino IDE\" class=\"wp-image-86790\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/ESP32-SPIFFS-Download-installer.png?w=657&amp;quality=100&amp;strip=all&amp;ssl=1 657w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/ESP32-SPIFFS-Download-installer.png?resize=300%2C148&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 657px) 100vw, 657px\" \/><\/figure><\/div>\n\n\n<p><strong>2)<\/strong> Find your Sketchbook location. In your Arduino IDE, go to <strong>File<\/strong> &gt; <strong>Preferences<\/strong> and check your Sketchbook location. In my case, it&#8217;s in the following path: <span class=\"rnthl rntliteral\">C:\\Users\\sarin\\Documents\\Arduino<\/span>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"802\" height=\"479\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Arduino-Sketchbook-location.png?resize=802%2C479&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino sketchbook location\" class=\"wp-image-110399\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Arduino-Sketchbook-location.png?w=802&amp;quality=100&amp;strip=all&amp;ssl=1 802w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Arduino-Sketchbook-location.png?resize=300%2C179&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Arduino-Sketchbook-location.png?resize=768%2C459&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 802px) 100vw, 802px\" \/><\/figure><\/div>\n\n\n<p><strong>3)<\/strong> Go to the sketchbook location, and create a <strong>tools <\/strong>folder.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"675\" height=\"229\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/creating-tools-folder-sketchbook-location.png?resize=675%2C229&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"creating tools folder sketchbook folder SPIFFS\" class=\"wp-image-110400\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/creating-tools-folder-sketchbook-location.png?w=675&amp;quality=100&amp;strip=all&amp;ssl=1 675w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/creating-tools-folder-sketchbook-location.png?resize=300%2C102&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><\/figure><\/div>\n\n\n<p><strong>4)<\/strong> Unzip the downloaded <em>.zip<\/em> folder. Open it and copy the <em><strong>ESP32FS <\/strong><\/em>folder to the <strong>tools<\/strong> folder you created in the previous step. You should have a similar folder structure:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;Sketchbook-location&gt;\/<strong>tools\/ESP32FS\/tool\/esp32fs.jar<\/strong><\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"131\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/install-filesystem-plugin-folder-structure.png?resize=750%2C131&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"install filesystem plugin folder structure\" class=\"wp-image-110401\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/install-filesystem-plugin-folder-structure.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/install-filesystem-plugin-folder-structure.png?resize=300%2C52&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p><strong>5)<\/strong> Finally, restart your Arduino IDE.<\/p>\n\n\n\n<p>To check if the plugin was successfully installed, open your Arduino IDE. Select your ESP32 board, go to <strong>Tools <\/strong>and&nbsp;check that you have the option &#8220;<strong>ESP32 Sketch Data Upload<\/strong>&#8220;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"295\" height=\"391\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/sketch-data-upload.png?resize=295%2C391&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 Sketch Data Upload Arduino IDE SPIFFS FS Filesystem\" class=\"wp-image-75771\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/sketch-data-upload.png?w=295&amp;quality=100&amp;strip=all&amp;ssl=1 295w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/sketch-data-upload.png?resize=226%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 226w\" sizes=\"(max-width: 295px) 100vw, 295px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"macos-installing\">MacOS X<\/h3>\n\n\n\n<p>Follow the next instructions if you&#8217;re using MacOS X.<\/p>\n\n\n\n<p><strong>1)<\/strong> Go to the <a href=\"https:\/\/github.com\/me-no-dev\/arduino-esp32fs-plugin\/releases\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">releases page and click the ESP32FS-1.0.zip<\/a> file to download.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"657\" height=\"324\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/ESP32-SPIFFS-Download-installer.png?resize=657%2C324&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Download ESP32 SPIFFS Filesystem fs for Arduino IDE\" class=\"wp-image-86790\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/ESP32-SPIFFS-Download-installer.png?w=657&amp;quality=100&amp;strip=all&amp;ssl=1 657w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/ESP32-SPIFFS-Download-installer.png?resize=300%2C148&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 657px) 100vw, 657px\" \/><\/figure><\/div>\n\n\n<p><strong>2)<\/strong> Unpack the files. <\/p>\n\n\n\n<p><strong>3)<\/strong> Create a folder called <strong>tools<\/strong> in <span class=\"rnthl rntliteral\">\/Documents\/Arduino\/<\/span>.<\/p>\n\n\n\n<p><strong>4)<\/strong> Copy the unpacked <strong><em>ESP32FS <\/em><\/strong>folder to the <strong>tools<\/strong> directory. You should have a similar folder structure.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>~Documents\/Arduino\/<strong>tools\/ESP32FS\/tool\/esp32fs.jar<\/strong><\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"347\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/install-filesystem-plugin-folder-structure-mac-os-X.png?resize=1024%2C347&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Install SPIFFS ESP32 Mac OS X folder structure\" class=\"wp-image-110406\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/install-filesystem-plugin-folder-structure-mac-os-X.png?resize=1024%2C347&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/install-filesystem-plugin-folder-structure-mac-os-X.png?resize=300%2C102&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/install-filesystem-plugin-folder-structure-mac-os-X.png?resize=768%2C260&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/install-filesystem-plugin-folder-structure-mac-os-X.png?w=1261&amp;quality=100&amp;strip=all&amp;ssl=1 1261w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p><strong>5)<\/strong> Finally, restart your Arduino IDE.<\/p>\n\n\n\n<p>To check if the plugin was successfully installed, open your Arduino IDE. Select your ESP32 board, go to <strong>Tools <\/strong>and&nbsp;check that you have the option &#8220;<strong>ESP32 Sketch Data Upload<\/strong>&#8220;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"765\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/ESP32-Data-Sketch-Upload-Menu-Arduino-IDE-Mac-OS.png?resize=750%2C765&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 Data Sketch Upload Menu Arduino IDE Mac OS\" class=\"wp-image-110407\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/ESP32-Data-Sketch-Upload-Menu-Arduino-IDE-Mac-OS.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/ESP32-Data-Sketch-Upload-Menu-Arduino-IDE-Mac-OS.png?resize=294%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 294w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p><a href=\"https:\/\/github.com\/me-no-dev\/arduino-esp32fs-plugin#usage\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"upload-files\">Uploading Files using the Filesystem Uploader<\/h2>\n\n\n\n<p>To upload files to the ESP32 filesystem follow the next instructions.<\/p>\n\n\n\n<p><strong>1)<\/strong> Create an Arduino sketch and save it. For demonstration purposes, you can save an empty sketch.<\/p>\n\n\n\n<p><strong>2)<\/strong> Then, open the sketch folder. You can go to <strong>Sketch <\/strong>&gt; <strong>Show Sketch Folder<\/strong>. The folder where your sketch is saved should open.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/rntlab.com\/wp-content\/uploads\/2018\/09\/show-sketch-folder.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino IDE Show Sketch folder to create data folder\" class=\"wp-image-17224\"\/><\/figure><\/div>\n\n\n<p><strong>3)<\/strong> Inside that folder, create a new folder called <em><strong>data<\/strong><\/em>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/rntlab.com\/wp-content\/uploads\/2018\/09\/data.fodler.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 Arduino Sketch Example File Filesystem fs SPIFFS\" class=\"wp-image-17225\"\/><\/figure><\/div>\n\n\n<p><strong>4)<\/strong> Inside the <strong><em>data<\/em> <\/strong>folder is where you should put the files you want to save into the ESP32 filesystem. As an example, create a <em>.txt<\/em> file with some text called <em>test_example<\/em>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/rntlab.com\/wp-content\/uploads\/2018\/09\/text_txt.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 Notepad Test Example File Filesystem fs SPIFFS\" class=\"wp-image-17226\"\/><\/figure><\/div>\n\n\n<p><strong>5)<\/strong> Then, to upload the files, in the Arduino IDE, you just need to go to <strong>Tools&nbsp;<\/strong>&gt; <strong>ESP32 Sketch Data Upload<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/rntlab.com\/wp-content\/uploads\/2018\/09\/sketch-data-upload.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 Sketch Data Upload Arduino IDE SPIFFS FS Filesystem\" class=\"wp-image-17223\"\/><\/figure><\/div>\n\n\n<p class=\"rntbox rntcred\">The uploader will overwrite anything you had already saved in the filesystem.<\/p>\n\n\n\n<p><strong>Note<\/strong>: in some ESP32 development boards you need to press the on-board <strong>BOOT <\/strong>button when you see the &#8220;Connecting &#8230;&#8230;.____&#8230;&#8230;&#8221; message.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"344\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/connecting.png?resize=650%2C344&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"SPIFFS Image Connecting to ESP32 board\" class=\"wp-image-75772\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/connecting.png?w=650&amp;quality=100&amp;strip=all&amp;ssl=1 650w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/connecting.png?resize=300%2C159&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/figure><\/div>\n\n\n<p>The files were successfully uploaded to the ESP32 filesystem when you see the message &#8220;<strong>SPIFFS Image Uploaded<\/strong>&#8220;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"211\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/spiffs-uploaded.png?resize=650%2C211&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"SPIFFS Image Uploaded to ESP32 board\" class=\"wp-image-75773\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/spiffs-uploaded.png?w=650&amp;quality=100&amp;strip=all&amp;ssl=1 650w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/spiffs-uploaded.png?resize=300%2C97&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"testing-uploader\">Testing the Uploader<\/h2>\n\n\n\n<p>Now, let\u2019s just check if the file was actually saved into the ESP32 filesystem. Simply upload the following code to your ESP32 board.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*********\n  Rui Santos\n  Complete project details at https:\/\/randomnerdtutorials.com  \n*********\/\n\n#include &quot;SPIFFS.h&quot;\n \nvoid setup() {\n  Serial.begin(115200);\n  \n  if(!SPIFFS.begin(true)){\n    Serial.println(&quot;An Error has occurred while mounting SPIFFS&quot;);\n    return;\n  }\n  \n  File file = SPIFFS.open(&quot;\/test_example.txt&quot;);\n  if(!file){\n    Serial.println(&quot;Failed to open file for reading&quot;);\n    return;\n  }\n  \n  Serial.println(&quot;File Content:&quot;);\n  while(file.available()){\n    Serial.write(file.read());\n  }\n  file.close();\n}\n \nvoid loop() {\n\n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/ESP32-Course\/raw\/master\/code\/SPIFFS\/SPIFFS_Test\/SPIFFS_Test.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<p>After uploading, open the Serial Monitor at a baud rate of 115200. Press the ESP32 &#8220;<strong>ENABLE<\/strong>\/<strong>RST<\/strong>&#8221; button. It should print the content of your <em>.txt<\/em> file on the Serial Monitor.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/rntlab.com\/wp-content\/uploads\/2018\/09\/testing-file-system-serial-monitor.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 SPIFFS FS Filesystem Example Arduino IDE Serial Monitor\" class=\"wp-image-17230\"\/><\/figure><\/div>\n\n\n<p>You\u2019ve successfully uploaded files to the ESP32 filesystem using the plugin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>Using the filesystem uploader plugin is one of the easiest ways to upload files to the ESP32 filesystem. Check the following project to see how to build a web server using HTML and CSS files stored on the filesystem:&nbsp;<a href=\"https:\/\/randomnerdtutorials.com\/esp32-web-server-spiffs-spi-flash-file-system\/\">ESP32 Web Server using SPIFFS (SPI Flash File System)<\/a>.<\/p>\n\n\n\n<p>Another way to save data permanently is using the ESP32 Preferences library. It is especially useful to save data as key:value pairs in the flash memory. Check the following tutorial:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-save-data-permanently-preferences\/\"> ESP32 Save Data Permanently using Preferences Library<\/a><\/li>\n<\/ul>\n\n\n\n<p>For more projects with ESP32, check the following resources:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><a href=\"https:\/\/randomnerdtutorials.com\/learn-esp32-with-arduino-ide\/\"><a href=\"https:\/\/randomnerdtutorials.com\/learn-esp32-with-arduino-ide\/\">Learn ESP32 with Arduino IDE<\/a><\/a><\/strong><\/li><li><strong><a href=\"https:\/\/randomnerdtutorials.com\/learn-esp32-with-arduino-ide\/\"><a href=\"https:\/\/randomnerdtutorials.com\/build-web-servers-esp32-esp8266-ebook\/\">Build Web Servers with ESP32 and ESP8266<\/a><\/a><\/strong><\/li><li><strong><a href=\"https:\/\/randomnerdtutorials.com\/learn-esp32-with-arduino-ide\/\"><a href=\"https:\/\/randomnerdtutorials.com\/firebase-esp32-esp8266-ebook\/\">Firebase Web App with ESP32 and ESP8266<\/a><\/a><\/strong><\/li><li><strong><a href=\"https:\/\/randomnerdtutorials.com\/learn-esp32-with-arduino-ide\/\"><a href=\"https:\/\/randomnerdtutorials.com\/projects-esp32\/\">Free ESP32 Projects and Tutorials\u2026<\/a><\/a><\/strong><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The ESP32 contains a Serial Peripheral Interface Flash File System (SPIFFS). SPIFFS is a lightweight filesystem created for microcontrollers with a flash chip, which is connected by SPI bus, like &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Install ESP32 Filesystem Uploader in Arduino IDE\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/install-esp32-filesystem-uploader-arduino-ide\/#more-75765\" aria-label=\"Read more about Install ESP32 Filesystem Uploader in Arduino IDE\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":5,"featured_media":110412,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[281,276,277,299,264],"tags":[],"class_list":["post-75765","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp32-project","category-esp32","category-esp32-arduino-ide","category-0-esp32","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Install-ESP32-Filesystem-Uploader-Arduino-IDE.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/75765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=75765"}],"version-history":[{"count":7,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/75765\/revisions"}],"predecessor-version":[{"id":155180,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/75765\/revisions\/155180"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/110412"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=75765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=75765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=75765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}