Merged the distribution changes

pull/123/head
Hieromon Ikasamo 6 years ago
parent 9a9668fd86
commit 1a96091f13
  1. 16
      examples/FSBrowser/FSBrowser.ino

@ -17,7 +17,7 @@
upload the contents of the data folder with MkSPIFFS Tool ("ESP8266 Sketch Data Upload" in Tools menu in Arduino IDE) upload the contents of the data folder with MkSPIFFS Tool ("ESP8266 Sketch Data Upload" in Tools menu in Arduino IDE)
or you can upload the contents of a folder if you CD in that folder and run the following command: or you can upload the contents of a folder if you CD in that folder and run the following command:
for file in `ls -A1`; do curl -F "file=@$PWD/$file" esp8266fs.local/edit; done for file in `\ls -A1`; do curl -F "file=@$PWD/$file" esp8266fs.local/edit; done
access the sample web page at http://esp8266fs.local access the sample web page at http://esp8266fs.local
edit the page by going to http://esp8266fs.local/edit edit the page by going to http://esp8266fs.local/edit
@ -61,14 +61,14 @@ File fsUploadFile;
//format bytes //format bytes
String formatBytes(size_t bytes){ String formatBytes(size_t bytes){
if (bytes < 1024){ if (bytes < 1024) {
return String(bytes)+"B"; return String(bytes) + "B";
} else if(bytes < (1024 * 1024)){ } else if (bytes < (1024 * 1024)) {
return String(bytes/1024.0)+"KB"; return String(bytes / 1024.0) + "KB";
} else if(bytes < (1024 * 1024 * 1024)){ } else if (bytes < (1024 * 1024 * 1024)) {
return String(bytes/1024.0/1024.0)+"MB"; return String(bytes / 1024.0 / 1024.0) + "MB";
} else { } else {
return String(bytes/1024.0/1024.0/1024.0)+"GB"; return String(bytes / 1024.0 / 1024.0 / 1024.0) + "GB";
} }
} }

Loading…
Cancel
Save