Open snahmad opened 6 years ago
I managed to add
int chdir(const char *path) { FRESULT result = f_chdir(path); return result == FR_OK ? 0 : -1; }
char getcwd(char buf, size_t size) { FRESULT result = f_getcwd(buf, size); return result == FR_OK ? buf : NULL; }
__fs = new FATFS_VFS("/spiflash", "storage");
It looks like FTPServer class do not have method to set root directory such as /spiflash or /sdcard.
Have some one test FTPServer class with spi flash or sd card.
The FTPServer class is quite new in this repository. So, I am not sure if ever someone used this class except Mr. Kolban. Unfortunately I currently do not have the time to work on my ESP32 project - otherwise we could try to get things working together as it seems that we have quite similar targets. My project finally also should use HttpServer with SSL serving a bigger size web page from an SD card. The web page will be made using a higher level Javascript framework and an FTP Server for updating this website. Later on I also would like to add MQTT protocol.
Have you tried HttpServer with SSL enabled yet?
no, also this I did not try until now. I am quite in the beginning of my project and I don't know if will ever be able to finish it. Until now I just tested HttpServer and mongoose server to serve a smaller web page. This works so far. I decided to stay with HttpServer as it is free SW because if I finish the project it might become a comercial thing. Maybe in a few weeks I will have time again to continue on this project.
ok. let me know outcome
o.k.
Have some one used this FTPServer yet. with SD card?
I have tried to use this FTP code as well, but I keep getting the same "undefined reference to getcwd" errors during the linking stage of the build. There must be some problems with the #include
Hi,
How to use FTPServer with example to use with spi flash and with sd card.
I also getting linker error. getcwd and chdir. I need to give function definitions for these. Can you provide example function definitions for these.
:/Work/Actisense/esp32/build/cpp_utils\libcpp_utils.a(FTPServer.o):(.literal._ZN9FTPServer19getCurrentDirectoryB5cxx11Ev+0x0): undefined reference to
getcwd' C:/Work/Actisense/esp32/build/cpp_utils\libcpp_utils.a(FTPServer.o):(.literal._ZN9FTPServer5onCwdERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE+0x8): undefined reference to
chdir' C:/Work/Actisense/esp32/build/cpp_utils\libcpp_utils.a(FTPServer.o): In functionFTPServer::getCurrentDirectory[abi:cxx11]()': C:/Work/LibDev/esp32/esp-idf/components/cpp_utils/FTPServer.cpp:229: undefined reference to
getcwd' C:/Work/Actisense/esp32/build/cpp_utils\libcpp_utils.a(FTPServer.o): In functionFTPServer::onCwd(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >&)': C:/Work/LibDev/esp32/esp-idf/components/cpp_utils/FTPServer.cpp:229: undefined reference to
chdir' collect2.exe: error: ld returned 1 exit status make: *** [C:/Work/LibDev/esp32/esp-idf/make/project.mk:389: /c/Work/Actisense/esp32/build/app-template.elf] Error 1