eloquentarduino / EloquentSurveillance

GNU General Public License v3.0
40 stars 10 forks source link

Motion File Server example bug #5

Open thammr opened 1 year ago

thammr commented 1 year ago

While this example works OK under 1.0.12, It does not display files under 1.0.13. When a file is selected from the list, I get a page with a "Rotate" button. This page references an image "/rawcapture_xx.jpg" and receives a 404 when trying to download it. The image file name apparently should be "/capture_xx.jpg"!

<button id="rotate" style="position:absolute;top:10px;left:10px;z-index:1;">Rotate</button><div id="frame" style="display:flex"><img id="image" src="/rawcapture_57.jpg" ...

Furthermore, with both versions of the library, the file list web page omits the first letter of each file e.g. "apture_xx.jpg" instead of "capture_xx.jpg". It also includes the filename "ystem Volume Information".

Patriboom commented 1 year ago

Furthermore, with both versions of the library, the file list web page omits the first letter of each file e.g. "apture_xx.jpg" instead of "capture_xx.jpg". It also includes the filename "ystem Volume Information".

To fix that, change the value of String path = uri.substring(5); If it does cut the first letter, set one under. vg: String path = uri.substring(4); in FileServer.h