Does anyone know if it is possible to serve a file with HG? IE as a http server serve out a file as http://192.168.0.1/myfile.zip
It would be very handy for something I am thinking of where i need to provide a web server to do an Over the Air Upgrade of the hardware and I could then package the hardware’s firmware and the HG code togther… rather than trying to get embedded devices follow redirects and use HTTPs.
I’m not sure if websocket-sharp is suited to this or not?
So having done a bit more digging example 3 (https://github.com/sta/websocket-sharp/tree/master/Example3) looks like it can serve files, but doesnt look like you can specifically serve any file without hard coding it… so not sure what the best way to proceed with this would be?
websocket-sharp is not suited for this.
Take a look at
WebServiceGateway class, there you will find the lines 327-517 which serves requests for files. You will need to add MIME-type mapping for archive types other then
.zip (if you need them), and then simply place archive inside the
One of examples is how backup archive downloading works: create a backup of system settings and then look for
homegenie_backup_config.zip file in