Closed FehnrirX closed 3 years ago
Hi FehnrirX,
you must remove F at this line
fileDescriptor[0].url = F(path);
.
Bye Renzo
Hi Renzo
Thanks for the respond. but now i get new issue
fileDescriptor[0].filename = fileName; fileDescriptor[0].url = path;
already check the contain of path and fileName, but serial show like this
any suggestion?
Hi FehnrirX, SPIFFS have some limitation (and directories were emulated not real), I think you don't use filename compliant. Try to open It on a simple sketch. You can find information here.
Bye Renzo
here's what it looks like. already match with the contain of the path
Hi, put the complete code on the forum and I'm going to debug. https://www.mischianti.org/forums/forum/yours-project/
Bye Renzo
please help.
i want to send csv file from spiffs with this path
String fileName = todayDate + ".csv"; String path = "/Data Absensi/" + todayDate + ".csv";
so i will send different csv every day, but it keep giving me error when i compile it
error is
In file included from C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\cores\esp8266/Arduino.h:286, from C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\cores\esp8266/FS.h:25, from D:\Project\Arduino\curt2\webserver_email\webserver_email.ino:2: D:\Project\Arduino\curt2\webserver_email\webserver_email.ino: In function 'void sendToEmail()': webserver_email:612:36: error: initializer fails to determine size of 'pstr' 612 | fileDescriptor[0].filename = F(fileName); C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\cores\esp8266/WString.h:39:76: note: in definition of macro 'FPSTR' 39 | #define FPSTR(pstr_pointer) (reinterpret_cast<const FlashStringHelper *>(pstr_pointer)) | ^
~~~ D:\Project\Arduino\curt2\webserver_email\webserver_email.ino:612:34: note: in expansion of macro 'F' 612 | fileDescriptor[0].filename = F(fileName); | ^ webserver_email:612:36: error: array must be initialized with a brace-enclosed initializer 612 | fileDescriptor[0].filename = F(fileName); C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\cores\esp8266/WString.h:39:76: note: in definition of macro 'FPSTR' 39 | #define FPSTR(pstr_pointer) (reinterpret_cast<const FlashStringHelper >(pstr_pointer)) | ^~~~ D:\Project\Arduino\curt2\webserver_email\webserver_email.ino:612:34: note: in expansion of macro 'F' 612 | fileDescriptor[0].filename = F(fileName); | ^ webserver_email:613:31: error: initializer fails to determine size of 'pstr' 613 | fileDescriptor[0].url = F(path); C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\cores\esp8266/WString.h:39:76: note: in definition of macro 'FPSTR' 39 | #define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper >(pstr_pointer)) | ^~~~ D:\Project\Arduino\curt2\webserver_email\webserver_email.ino:613:29: note: in expansion of macro 'F' 613 | fileDescriptor[0].url = F(path); | ^ webserver_email:613:31: error: array must be initialized with a brace-enclosed initializer 613 | fileDescriptor[0].url = F(path); C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\cores\esp8266/WString.h:39:76: note: in definition of macro 'FPSTR' 39 | #define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer)) | ^~~~ D:\Project\Arduino\curt2\webserver_email\webserver_email.ino:613:29: note: in expansion of macro 'F' 613 | fileDescriptor[0].url = F(path); | ^ Multiple libraries were found for "SD.h" Used: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\SD Not used: C:\Program Files (x86)\Arduino\libraries\SD exit status 1 initializer fails to determine size of 'pstr'what should i do?