How to download files from the file system via web browser?

I am trying to download files from the Flash0 from my 9p9215 device.

I understand that I can call the URL from the web server as IP/FS/FLASH0/FILE and the download dialog appears. The problem is that the file is 0 bytes. I tried with different files and this keeps happening.

I tried downloading the files via FTP and it works fine.

Maybe it is a problem with the permitions on the files?



Have you looked at the sample application entitled"HTTP File System Sample"? This is in new->new-?NET+OS Sample Project

Also and this is NOT well documented, to have the file system work in conjunction with the Web Server you MUST have APP_FILE_SYSTEM defined either in appconf.h or from ESP right click on your project click properties. Then C/C++ Build. Then Tool Settings. Then C Compiler->symbols. Add the symbol APP_FILE_SYSTEM. With APP_FILE_SYSTEM UNDEFINED, all of the file system APIs that the web server interacts with are no-ops and you’d get 0 length files, but the FTP server would still work (uses a different interface).

1 Like