-->
Page 1 of 1

FTP server for ESP8266-12E with SDcard

PostPosted: Thu Aug 18, 2016 5:22 am
by lwk
Hello!
I already saw an example about Simple FTP Server for SPIFFS. I try to upload the sketch to my ESP8266-12E and try to send the file to ESP8266 by FTP. It is work! The sketch is very good. :)
viewtopic.php?f=29&t=7655

I know the file is stored in SPIFFS of ESP8266. However, I want to store the file in SD card. So, my question is that Is it possible to transfer the file from SPIFFS to SD card? I already search in google, but I still can't find the solution. Can anyone help me? Many thanks!

Re: FTP server for ESP8266-12E with SDcard

PostPosted: Fri Sep 23, 2016 6:51 am
by la3bna
Im guessing you have to add in SD card in setup and then replace
Code: Select all if (SPIFFS.begin()) {
      Serial.println("SPIFFS opened!");
      ftpSrv.begin("esp8266","esp8266");    //username, password for ftp.  set ports in ESP8266FtpServer.h  (default 21, 50009 for PASV)
  }   
}


With something like:
Code: Select all if (SD.begin()) {
      Serial.println("SD opened!");
      ftpSrv.begin("esp8266","esp8266");    //username, password for ftp.  set ports in ESP8266FtpServer.h  (default 21, 50009 for PASV)
  }   
}