I'm beginning to develop a program(in the beginning at least) aimed at Firefox OS to transfer files(Music, Pictures and Video) from another device(lets call it device2) to the device(device1) running Firefox OS. One problem is how to transfer files from the webpage running on device2 to device1. I have looked at XHR and websockets which both would suffice, but I have not found a way to receive on the Firefox OS driven device. My question then is if there is a way to transfer files between webpages on different devices without an intermediary web server somewhere else.
On another note, to make the application as robust as possible I would also like to serve the HTML/JS/CSS files from device1 to device2 if that can factor into the answer to the above it would be even better.