-
• #2
I'm not sure you're using the code you have above.
readArrayBuffer
won't report backNO_PATH
- that error comes from when you use thefs
library withrequire("fs")
(which is a FATFS filesystem) -
• #3
I use storage library (4 line)
1 Attachment
-
• #4
upd:
I changed the information in 'memory' in var webs to '/' and got this error:WebServer error Error: Error: Could not open file : INVALID_NAME
-
• #5
That's from the FAT filesystem again. It's the
WebServer
module you're using: https://github.com/espruino/EspruinoDocs/blob/master/modules/WebServer.js#L188-L189Looks like when you init the webserver you need to be sure you specifically list your file:
memory: { 'web.html': { 'content': require("Storage").read('web.html'), 'type': 'text/html' },
See https://www.espruino.com/WebServer#how-to-use-the-webserver-module
-
• #6
... or you can try copying the data into the FAT filesystem:
require("fs").writeFileSync('web.html', require("Storage").read('web.html'))
At the moment the Web IDE doesn't have the ability to access/upload to the FAT filesystem directly as it's something that got added just for the ESP32
-
• #7
used this, still got error "INVALID_NAME". Btw I uploaded file by this function in the IDE
1 Attachment
-
• #8
I figured out the problem, I had to name the file in memory index.html (I just started studying all this), thanks for the answers and help!
I want to make a webserver using webserver module. I uploaded an html file via Espruino WEB IDE and wanted to reference it when creating a webserver, I did it in the following way:
but when I start my server and browse the page, I see this message:
what did I do wrong?