summaryrefslogtreecommitdiffstats
path: root/README.md
blob: fe6ff29595464099cb87d5d74c764bf7677ab2d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# espFTPServer
Simple FTP Server for using esp8266/esp32 
I've modified a FTP server from arduino/wifi shield to work with the esp826. It should also work on the esp32. LittleFS with directory handling is supported since SPIFFS has been marked deprecated.
This allows you to FTP into your esp8266/esp32 and access/modify the LittleFS/SPIFFS folder/data.
I've tested it with Filezilla, and it works (upload/download/rename/delete). There's no create/modify directory support in SPIFFS but in LittleFS there is!

## Features
* Supports active and passive FTP
* Works with LittleFS and SPIFFS
* Supports Directories in LittleFS

## Limitations
* It only allows one ftp control and one data connection at a time. You need to setup Filezilla (or other clients) to respect that, i.e. only allow **1** connection. (In FileZilla go to File/Site Manager then select your site. In Transfer Settings, check "Limit number of simultaneous connections" and set the maximum to 1.)
* It does not support encryption, so you'll have to disable any form of encryption...

## Useage

### Construct an espFTPServer
Select the desired FS via the contructor 
```cpp
#include <espFTPServer.h>
#include <LittleFS.h>

espFTPServer ftpServer(LittleFS); // construct with LittleFS
// or
espFTPServer ftpServer(SPIFFS);   // construct with SPIFFS if you need to for backward compatibility
```

### Configure username/password
```cpp
ftpServer.begin("username", "password");
```

### Handle by calling frequently
```cpp
ftpServer.handleFtp(); // place this in e.g. loop()
```


## Notes
I forked from https://github.com/nailbuster/esp8266FTPServer which itself was forked from: https://github.com/gallegojm/Arduino-Ftp-Server/tree/master/FtpServer