luc-github / ESP3D-WEBUI

A Web UI for ESP8266 or ESP32 based boards connected to 3D printers / CNC
GNU General Public License v3.0
752 stars 305 forks source link

Fixed files not uploading #195

Closed cotepat closed 2 years ago

cotepat commented 2 years ago

Previous merge created a problem with files upload. This is now fixed...

luc-github commented 2 years ago

ho man - I did not pay attention you changed files.js...

why did you added https://github.com/luc-github/ESP3D-WEBUI/pull/193/files#diff-8c3b8bb71847bc8424c678587d05120f5496b99c00092822891a57322be2f177R862 ? line 842 : files_refreshFiles(path) it is not needed

cotepat commented 2 years ago

It is needed for the surfacing because it creates a directory and a file and if we don't call "file refresh", the path shown on the ui is not the same as the one in "files_currentPath". It could be called by the surfacing function, but I thought the files_start_upload2 would be more generic this way (Does not depend on any global variables). Let me know if you want me to do it in a different manner. No problem... And sorry for the mistake!

luc-github commented 2 years ago

this affect all targets and do extra queries that may bring mess / and extra serial communication - that may be ok on GRBL_ESP32 but not on others Shared SD on Marlin / Serial SD on all platform

Need to test all platform now ... my mistake I should check more carefully, before merge

cotepat commented 2 years ago

Luc. Don't worry... . I don't think it is worth doing a lot of testing. I will put it back the way it was and call the refresh only on surfacing. Just confirm and I will do that..

luc-github commented 2 years ago

OK thank you - I appreciate - I propose you I revert the 2 last commits so you can do a clean PR

cotepat commented 2 years ago

Sure.

luc-github commented 2 years ago

That is why I splited all target code in 3.0 - it become too hard to ensure no side effect with all targets