How can I download / access a file contained in the ESP8266 SPIFFS memory over the internet and not only on a local wi-fi? Can it send a complete file contained on its SPIFFS memory to a website or to a location where one could download the file using internet? Basically, I want to send a file from its memory to any person having access to the internet.
-
1Hi, and welcome to the site! I've edited your post to improve clarity. Please feel free to re-edit if I failed to convey the meaning you intended.– anonymous2 ♦Commented Mar 2, 2018 at 20:18
-
1So, what you're asking is, how do you give access to your ESP8266 to anyone on the internet - if, as is most likely, your LAN is behind a NAT router, you'll need to add a port forward rule to the router to open a port to the ESP8266– Jaromanda XCommented Mar 4, 2018 at 0:10
1 Answer
If you really want to make accessible your constrained device from the open internet, you will have to configure your router so that incoming connections are allowed. This is done by forwarding ports in your NAT Router. Then, on top of that, you have to convert your constrained device in some kind of file server.
However, this looks to me like a bad idea. Making your device accessible from the wild internet opens a huge surface for malicious activities, and since we are talking about a constrained device, you probably will not have the resources to handle authentication, authorization, encryption, etc. In short: your device will get pwned. I would say that it is a more sensible strategy to make your constrained device send that data to a trusted more powerful machine within your network (and optionally relay it again outside of your network), and tell the clients to access that machine instead.