DeeEmm / DIY-Flow-Bench

Volumetric flow bench based on ESP32 and MAF sensor.
GNU General Public License v3.0
27 stars 8 forks source link

ESP32 Server Functions #71

Closed DeeEmm closed 3 years ago

DeeEmm commented 3 years ago

Realtime Clock Uptime

DeeEmm commented 3 years ago

File download cannot be achieved by websockets which would have been my preference to keep all data handling in one place

Generally we can only serve a file in response to a download request from the browser which means that we cannot 'push' the file to the client via web sockets. This is a security measure to prevent malicious use. However, HTML5 does allow us to do this (see link below), but it requires browser side code which is not compatible for all browsers (yes IE we are talking about you)

So currently we will handle the file download within the server request handlers in the setup function as this does not require additional browser-side code

https://blog.logrocket.com/programmatic-file-downloads-in-the-browser-9a5186298d5c/

DeeEmm commented 3 years ago

File Delete function completed.

DeeEmm commented 3 years ago

File upload function completed