title: How to save bitmap using OV7670 ESP32 and SPIFFS?
body: <p>I am doing a wifi camera project using the <code>OV7670</code> and <code>ESP32</code> bundles: <a href="https://github.com/bitluni/ESP32CameraI2S" rel="nofollow noreferrer">https://github.com/bitluni/ESP32CameraI2S</a>. </p>
  
  <p>How can I save the bitmap using <code>SPIFFS</code> in <code>File</code>? </p>
  
  <p>Part of the code:</p>
  
  <pre><code>void Get_photo (AsyncWebServerRequest * request) {
     camera-&gt; oneFrame ();
     File file = SPIFFS.open ("/ Images / test.bmp", FILE_WRITE); // How to save to this file?
  
     for (int i = 0; i &lt;BMP :: headerSize; i ++)
     {
         bmpHeader [i];
     }
  
     for (int i = 0; i &lt;camera-&gt; xres * camera-&gt; yres * 2; i ++)
     {
        camera-&gt; frame [i];
     }
  
  
    Serial.println ("PHOTO_OK!");
  }
  </code></pre>