Browse Source

upload.html fixes

Minor modifications so it works without zipping and without compiling
lua. Fits well on WEMOS D1 Pro - we’ll see if anyone complains.
Marcos Kirsch 7 years ago
parent
commit
87e1a4babc
4 changed files with 5 additions and 4 deletions
  1. 1 0
      http/hello_world.txt
  2. 1 1
      http/index.html
  3. 3 3
      http/upload.html
  4. BIN
      http/upload.html.gz

+ 1 - 0
http/hello_world.txt

@@ -0,0 +1 @@
+Hello World!

+ 1 - 1
http/index.html

@@ -29,7 +29,7 @@
       <li><a href="node_info.lua">NodeMCU info</a>: Shows some basic NodeMCU(Lua)</li>
       <li><a href="file_list.lua">List all server files</a>: Displays a list of all the server files. (Lua)</li>
       <li><a href="foo.html">Foo</a>: A file that doesn't exist. Should error (404 error)</li>
-	  <li><a href="upload.html">Upload</a>: update, remove, list files on the server.</li>
+      <li><a href="upload.html">Upload</a>: update, remove, list files on the server. By <a href="https://github.com/ATAMAH">ATAMAH</a>.</li>
    </ul>
 </body>
 </html>

+ 3 - 3
http/upload.full.html → http/upload.html

@@ -396,7 +396,7 @@
 						fileUploadRequest = 0;
 					}
 
-					lastRequest = 'upload.lc?cmd=upload&filename=' + file.name + '&filesize=' + file.size + '&len=' + chunkLen + '&offset=' + sendingOffset + '&data=' + filedata;
+					lastRequest = 'upload.lua?cmd=upload&filename=' + file.name + '&filesize=' + file.size + '&len=' + chunkLen + '&offset=' + sendingOffset + '&data=' + filedata;
 
 					fileUploadRequest.timeout = 5000;
 					fileUploadRequest.open('GET', lastRequest, true);
@@ -526,7 +526,7 @@
 					fileListRequest = null;
 				}
 
-				fileListRequest.open('GET', 'upload.lc?cmd=list', true);
+				fileListRequest.open('GET', 'upload.lua?cmd=list', true);
 				fileListRequest.send();
 			}
 
@@ -541,7 +541,7 @@
 					}
 				}
 
-				fileRemoveRequest.open('GET', 'upload.lc?cmd=remove&filename=' + name, true);
+				fileRemoveRequest.open('GET', 'upload.lua?cmd=remove&filename=' + name, true);
 				fileRemoveRequest.send();
 			}
 		</script>

BIN
http/upload.html.gz