Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
3d65027
Minimal file with a few ESP8266-specific keywords - github issue #3701
vdeconinck Oct 21, 2017
8370794
Merge branch 'master' of https://github.com/esp8266/Arduino
vdeconinck Mar 14, 2020
211929c
Renamed "SDWebServer" to the more universal "WebFileManager"
vdeconinck Mar 14, 2020
a1ed3ba
SD was replaced by SDFS, and sketch now works on either SDFS, SPIFFS or
vdeconinck Mar 14, 2020
3c42a8d
Tree panel width is now proportional to window. Changed icons (lighte…
vdeconinck Mar 14, 2020
82d50b4
Replaced by a lighter version
vdeconinck Mar 14, 2020
4e04514
Return the filesystem time in the status object
vdeconinck Mar 14, 2020
6aad505
Fixed folder handling
vdeconinck Mar 14, 2020
26b772d
Replaced the FILESYSTEM #define by a filesystem variable, and introdu…
vdeconinck Mar 14, 2020
c1947d4
Made 8.3 lowercase filenames formating optional (disabled by default).
vdeconinck Mar 14, 2020
83e3c49
Added 'wait' cursor during asynchronous operations.
vdeconinck Mar 14, 2020
5217201
Removed limitation "files must have an extension, folders may not".
vdeconinck Mar 14, 2020
40310da
Merge branch 'master' of https://github.com/esp8266/Arduino
vdeconinck Mar 14, 2020
df49379
Support Filenames without extension, Dirnames with extension.
vdeconinck Mar 15, 2020
637cb4d
Fixed tree refresh on delete in all cases by returning the remaining …
vdeconinck Mar 15, 2020
36e28cc
Changed FS status in text by a percentage graph, with numbers as tool…
vdeconinck Mar 18, 2020
99cf471
Merge branch 'master' of https://github.com/esp8266/Arduino
vdeconinck Mar 18, 2020
f76dfaf
Small fix + refactoring
vdeconinck Mar 20, 2020
f0b87ef
Restrict filename support check to SPIFFS.
vdeconinck Mar 20, 2020
53126c5
Implemented Move/Rename.
vdeconinck Mar 29, 2020
ad3b008
Merge branch 'master' of https://github.com/esp8266/Arduino
vdeconinck Mar 29, 2020
967d037
Fixed broken spinner
vdeconinck Mar 29, 2020
e3529e9
Cosmetic improvements.
vdeconinck Mar 29, 2020
3745906
Added specific icons for text and image files.
vdeconinck Apr 2, 2020
2aabb70
Added favicon.ico.
vdeconinck Apr 2, 2020
83644bb
Renaming project
vdeconinck Apr 2, 2020
73490be
Renamed project
vdeconinck Apr 2, 2020
11635c5
Renamed project
vdeconinck Apr 2, 2020
6354c9f
Small changes
vdeconinck Apr 2, 2020
b32f6c7
Add a note about the ace.js dependency
vdeconinck Apr 2, 2020
94c5ad7
Minor changes
vdeconinck Apr 2, 2020
99ba015
Define LittleFS by default.
vdeconinck Apr 2, 2020
6f48db4
Define LittleFS by default.
vdeconinck Apr 2, 2020
30eeeb6
Restyled version
vdeconinck Apr 2, 2020
f40f212
Merge branch 'master' into master
d-a-v Apr 3, 2020
3889b96
(dummy edit to retrigger broken CI)
vdeconinck Apr 3, 2020
24cd70f
Merge branch 'master' of https://github.com/esp8266/Arduino
vdeconinck Apr 3, 2020
441ae32
Merge branch 'master' of https://github.com/vdeconinck/Arduino-1
vdeconinck Apr 3, 2020
cc61220
Using unsigned int for comparison with String.length()
vdeconinck Apr 3, 2020
6fcbdf2
Return an error when upload fails (e.g. filesystem full)
vdeconinck Apr 3, 2020
ab34ffc
Merge branch 'master' into master
earlephilhower Apr 4, 2020
534081a
Trying to reorder functions to please CI
vdeconinck Apr 6, 2020
440251e
Merge branch 'master' of https://github.com/vdeconinck/Arduino-1
vdeconinck Apr 6, 2020
b6ba07e
Reordered functions to please CI.
vdeconinck Apr 6, 2020
9a81b8b
Moved file
vdeconinck Apr 6, 2020
bb8f250
Merge branch 'master' of https://github.com/esp8266/Arduino
vdeconinck Apr 6, 2020
c953d96
Renamed "SDWebServer" to the more universal "WebFileManager"
vdeconinck Mar 14, 2020
6ca8da5
SD was replaced by SDFS, and sketch now works on either SDFS, SPIFFS or
vdeconinck Mar 14, 2020
6d501ab
Tree panel width is now proportional to window. Changed icons (lighte…
vdeconinck Mar 14, 2020
4ae345f
Replaced by a lighter version
vdeconinck Mar 14, 2020
4fab7e7
Return the filesystem time in the status object
vdeconinck Mar 14, 2020
82904ff
Fixed folder handling
vdeconinck Mar 14, 2020
b68f5fd
Replaced the FILESYSTEM #define by a filesystem variable, and introdu…
vdeconinck Mar 14, 2020
842b914
Made 8.3 lowercase filenames formating optional (disabled by default).
vdeconinck Mar 14, 2020
5c0d0a7
Added 'wait' cursor during asynchronous operations.
vdeconinck Mar 14, 2020
2864f35
Removed limitation "files must have an extension, folders may not".
vdeconinck Mar 14, 2020
992fa31
Support Filenames without extension, Dirnames with extension.
vdeconinck Mar 15, 2020
da09f36
Fixed tree refresh on delete in all cases by returning the remaining …
vdeconinck Mar 15, 2020
f0587c2
Changed FS status in text by a percentage graph, with numbers as tool…
vdeconinck Mar 18, 2020
c6948fc
Small fix + refactoring
vdeconinck Mar 20, 2020
16acb24
Restrict filename support check to SPIFFS.
vdeconinck Mar 20, 2020
9bba9dd
Implemented Move/Rename.
vdeconinck Mar 29, 2020
1fec42a
Fixed broken spinner
vdeconinck Mar 29, 2020
7cc0eb2
Cosmetic improvements.
vdeconinck Mar 29, 2020
d709ae5
Added specific icons for text and image files.
vdeconinck Apr 2, 2020
0b3ba4e
Added favicon.ico.
vdeconinck Apr 2, 2020
f541b6d
Renaming project
vdeconinck Apr 2, 2020
917dacd
Renamed project
vdeconinck Apr 2, 2020
86dfa58
Renamed project
vdeconinck Apr 2, 2020
86b54a4
Small changes
vdeconinck Apr 2, 2020
1c5d10f
Add a note about the ace.js dependency
vdeconinck Apr 2, 2020
170f3fb
Minor changes
vdeconinck Apr 2, 2020
ef26c49
Define LittleFS by default.
vdeconinck Apr 2, 2020
780db41
Define LittleFS by default.
vdeconinck Apr 2, 2020
697f133
Restyled version
vdeconinck Apr 2, 2020
612b8ca
(dummy edit to retrigger broken CI)
vdeconinck Apr 3, 2020
180705a
Using unsigned int for comparison with String.length()
vdeconinck Apr 3, 2020
c4b7369
Return an error when upload fails (e.g. filesystem full)
vdeconinck Apr 3, 2020
b993004
Trying to reorder functions to please CI
vdeconinck Apr 6, 2020
109ca0c
Reordered functions to please CI.
vdeconinck Apr 6, 2020
bc580c7
Merge branch 'master' of https://github.com/vdeconinck/Arduino-1
vdeconinck Apr 7, 2020
d6a8350
Update to use chunked response API
vdeconinck Apr 7, 2020
c3a33e6
Removed temp files commited by mistake
vdeconinck Apr 7, 2020
16b9329
Avoid using args() as requested
vdeconinck Apr 9, 2020
b0fa096
Use html entity for non-breaking space to avoid losing char when mini…
vdeconinck Apr 9, 2020
50f2a73
Script to preprocess index.htm
vdeconinck Apr 9, 2020
ecfa7ba
Merge branch 'master' of https://github.com/vdeconinck/Arduino-1
vdeconinck Apr 10, 2020
88968df
(reformated code)
vdeconinck Apr 10, 2020
1e04240
(comments)
vdeconinck Apr 10, 2020
dd3fe6d
Preprocessed files
vdeconinck Apr 10, 2020
54f8d79
Fixed dump to create an actual include file
vdeconinck Apr 11, 2020
5728526
Optionally embed index.htm in code.
vdeconinck Apr 11, 2020
0052336
(reformated)
vdeconinck Apr 11, 2020
616297f
Merge branch 'master' into master
vdeconinck Apr 11, 2020
fccbfff
Merge branch 'master' into master
vdeconinck Apr 11, 2020
d7e6d27
If editor cannot be loaded from the web, try a local version, or default
vdeconinck Apr 11, 2020
ac1ff02
Merge branch 'master' of https://github.com/vdeconinck/Arduino-1
vdeconinck Apr 11, 2020
d2fe22e
(removed a TODO item :-))
vdeconinck Apr 11, 2020
25d2600
Merge branch 'master' into master
earlephilhower Apr 11, 2020
461a7f1
(forgot to reprocess files after last commit)
vdeconinck Apr 12, 2020
30fe3ab
Merge branch 'master' of https://github.com/vdeconinck/Arduino-1
vdeconinck Apr 12, 2020
cb98a52
(reprocess should be ok this time)
vdeconinck Apr 12, 2020
bc09207
Return error 500 when upload fails immediately (e.g. filesystem full)
vdeconinck Apr 12, 2020
941a7ec
Use standard <meter> tag for filesystem use
vdeconinck Apr 12, 2020
3fc2416
(updated following changes to index.htm)
vdeconinck Apr 12, 2020
3bdd5f0
Merge branch 'master' into master
d-a-v Apr 19, 2020
c5b66ff
Merge branch 'master' into master
vdeconinck Apr 22, 2020
c5f99a3
Merge branch 'master' into master
devyte Apr 23, 2020
6b66a8f
Merge branch 'master' of https://github.com/esp8266/Arduino
vdeconinck Apr 24, 2020
102908f
Merge branch 'master' of https://github.com/vdeconinck/Arduino-1
vdeconinck Apr 24, 2020
c35b72e
Do not include gzipped version in the data folder by default. Leave i…
vdeconinck Apr 24, 2020
1b4499b
Gzipped index file not included in data/edit by default. It is now le…
vdeconinck Apr 24, 2020
52e5809
Reduce String clutter by reserving and concatenating elements one by …
vdeconinck Apr 26, 2020
cb8938f
Use clear() to reset String.
vdeconinck Apr 26, 2020
83fcdc9
Avoid comparisons against empty String.
vdeconinck Apr 26, 2020
fcfca4c
Use char instead of single-char String where possible.
vdeconinck Apr 26, 2020
1115837
Prefer direct logic over inverted.
vdeconinck Apr 26, 2020
14463dc
Rename returnBlah to replyBlah.
vdeconinck Apr 26, 2020
cffeb76
Renamed h2int to hexDigitToInt
vdeconinck Apr 26, 2020
c8a2181
Renamed getFileError() to checkForUnsupportedPath(), to avoid confusion
vdeconinck Apr 26, 2020
a740ec2
Misc improvements.
vdeconinck Apr 26, 2020
d6eb21d
Added comments about mandatory rebuilding gz and h files in case of u…
vdeconinck Apr 26, 2020
cb7b0d1
Addressed a few comments.
vdeconinck Apr 26, 2020
c4b4ec0
Improve replies: bad requests vs server error
vdeconinck Apr 26, 2020
6f6ed1d
(reformated)
vdeconinck Apr 26, 2020
998de01
Reduce clutter by reserving String size beforehand.
vdeconinck Apr 26, 2020
b8b7d85
Moved most Strings of more than 10 chars to flash.
vdeconinck Apr 27, 2020
d5af55b
Merge branch 'master' into master
vdeconinck Apr 27, 2020
2aabe70
Use lib version of urlDecode() instead of a local one, and only call …
vdeconinck Apr 28, 2020
5c86ac0
Added a comment about the dangers of recursion on embedded devices.
vdeconinck Apr 28, 2020
50ea735
Added a more explicit warning in the .h header comment.
vdeconinck Apr 28, 2020
e53c634
Added a typical set of required files to load ace editor from the ESP.
vdeconinck Apr 29, 2020
065b366
Merge branch 'master' of https://github.com/vdeconinck/Arduino-1
vdeconinck Apr 29, 2020
cc32ac8
(reformated)
vdeconinck Apr 29, 2020
d6db83d
More explicit warning at the beginning of the .h version.
vdeconinck Apr 29, 2020
2384e90
Merge branch 'master' into master
vdeconinck Apr 29, 2020
2a48168
Merge branch 'master' into master
devyte Apr 29, 2020
0348a17
Merge branch 'master' into master
devyte Apr 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cosmetic improvements.
Removed non-functional Upload context menu.
Fixed error in response to move requests.
Added minified version.
  • Loading branch information
vdeconinck committed Mar 29, 2020
commit e3529e923c47df16da7ac6548f82c3f13b06b46f
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
* - Support Filenames without extension, Dirnames with extension
* - Improved recursive refresh of parts of the tree (e.g. upon file delete, refresh subfolder, move to a closed folder)
* - Added Save/Discard/Help buttons to ACE editor, discard confirmation on leaveand refresh tree/status upon save
* - Removed Upload from context menu (didn't work anyway)
* - Added Rename/Move feature to context menu
*
* TODO:
* - Cleanup (look for TODO below and in HTML)
* - Include minified version of the JS code
* - ? Add a visible root node "/" (without a delete option) + add the FS type next to it, like <i>LittleFS</i> + move "Mkdir" and "MkFile" to context menu + implement drag/drop for move + make "rename" only a local rename operation (no move) + remove recursive opening ?
* - ? Can we query the fatType of the SDFS (and limit to 8.3 if FAT16)
* - ? Check if ace.js is reachable and default to text viewer otherwise
* - ? Present SPIFFS as a hierarchical FS
* - ? Is there a case where we need to limit files to 8.3 ?
* - Perform test suite again
*
* TEST: (#XXX = failed / vXXX = OK)
Expand Down Expand Up @@ -346,7 +349,7 @@ void handleFileCreate() {
}

String path = server.arg("path");
if (path == "") { // todo is this the right test in case of no arg
if (path == "") {
return returnFail("MISSING PATH ARG");
}
if (path == "/") {
Expand Down Expand Up @@ -383,7 +386,7 @@ void handleFileCreate() {
else {
// Two arguments: rename
String src = server.arg("src");
if (src == "") { // todo is this the right test in case of no arg
if (src == "") {
return returnFail("MISSING SRC ARG");
}
if (src == "/") {
Expand All @@ -404,7 +407,7 @@ void handleFileCreate() {
if (!fileSystem->rename(src, path)) {
return returnFail("RENAME FAILED");
}
returnOKWithMsg(lastExistingParent(src) + "/");
returnOKWithMsg(lastExistingParent(src));
}
}

Expand Down Expand Up @@ -470,7 +473,7 @@ void handleFileDelete() {
}
deleteRecursive(path);

returnOKWithMsg(lastExistingParent(path) + "/");
returnOKWithMsg(lastExistingParent(path));
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
<head>
<title>File manager</title>
<style type="text/css" media="screen">
body {
font-size: 12px;
font-family: Verdana, Arial, Sans-serif;
}
.contextMenu {
z-index: 300;
position: absolute;
Expand All @@ -11,9 +15,8 @@
background-color: #F5F5F5;
display: none;
box-shadow: 0 0 10px rgba( 0, 0, 0, .4 );
font-size: 12px;
font-family: sans-serif;
font-weight:bold;
font-size: 11px;
font-weight: bold;
}
.contextMenu ul {
list-style: none;
Expand Down Expand Up @@ -45,7 +48,7 @@
opacity: 0;
}
.css-treeview {
font: normal 11px Verdana, Arial, Sans-serif;
font-size: 11px;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
Expand Down Expand Up @@ -200,14 +203,14 @@
top: 4px;
right: 10px;
height: 28px;
font: normal 14px Verdana, Arial, Sans-serif;
font-size: 14px;
}

/* Spinner based on from https://github.com/jlong/css-spinners */
#loading {
position:absolute;
// note: changing between block and none cancels the opacity anim, so we move it in and out of screen instead by changing the top value
// ? TODO: see https://www.impressivewebs.com/animate-display-block-none/ for another approach
// maybe see https://www.impressivewebs.com/animate-display-block-none/ for another approach
display:block;
top: -100vh;
left: 0;
Expand All @@ -230,7 +233,7 @@
left: 50%;
transform: translateX(-50%);
color:white;
font: normal 32px Verdana, Arial, Sans-serif;
font-size: 32px;
}

@keyframes spinner-anim {
Expand Down Expand Up @@ -431,7 +434,7 @@
pathInput.value = getParentFolder(pathInput.value) + "/" + filename;
}

upload.onclick = function(e){
upload.onclick = function(e) {
if(fileSelector.files.length === 0) return;
tree.httpUpload(fileSelector.files[0], pathInput.value);
}
Expand Down Expand Up @@ -512,7 +515,7 @@
document.getElementById("editor").style.display = "none";
document.getElementById("editorButtons").style.display = "none";
preview.style.display = "block";
preview.innerHTML = "(file not found or format not supported)";
preview.innerHTML = "<div style='text-align:center'>(file not found or format not supported)</div>";
}

function isTextFile(path){
Expand Down Expand Up @@ -580,17 +583,6 @@
httpList(path);
};
}
var upload = document.createElement("li");
list.appendChild(upload);
upload.innerHTML = "<span>Upload</span>";
upload.onclick = function(e){
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
var pathInput = document.getElementById("pathInput");
var subPath = pathInput.value.trim();
if(subPath.lastIndexOf("/") < 1) pathInput.value = path + subPath;
else pathInput.value = getParentFolder(path) + subPath;
// TODO errr... where is the actual upload ? Did it get lost ?
};
var renFolder = document.createElement("li");
list.appendChild(renFolder);
renFolder.innerHTML = "<span>Rename/Move</span>";
Expand Down Expand Up @@ -739,12 +731,7 @@
});
var list = document.createElement("ul");

var parentEl = document.getElementById(parentPath);
if (!parentEl) {
// TODO handle this case (happens when moving a file to a closed nested folder)
alert("parentEl not found for path '" + parentPath + "'");
}
parentEl.appendChild(list);
document.getElementById(parentPath).appendChild(list);
var ll = items.length;
for(var i = 0; i < ll; i++){
var item = items[i];
Expand Down
Binary file not shown.