How to upload image data to internet?

Hi

I wonder anybody has an example for uploading image data to the internet? I have a half example using the agent code, but the example is not completed and there sample example is too enough for me. Can anybody show me an example of the agent code and the server php code? Thank you very much.

Are you looking for pointers on sending image data from the agent to an external server?

There’s a pretty staightforward example on github, here: https://github.com/electricimp/examples/blob/master/vc0706/vc0706.agent.nut

This shows you how to send image data (that came from a VC0706 DSP chip, like the one on Radioshack or Adafruit’s camera module boards) to a server.

The PHP script you’d use to receive and save the image data is here: https://github.com/electricimp/examples/blob/master/vc0706/upload.php

The actual code is almost as short as that link:

<?php $s = @file_get_contents('php://input'); file_put_contents("/var/www/hackathon/camera.jpg", $s); ?>

@tbuttner- Is there an example on Github for sending audio data from Lala directly to a server without using RAM? I’m sure it’s very similar to the image example?

I think you’re the guy to talk to about Hannah Rev3 code. Do you have an example for the RGB light sensor or Accellerometer? The simple example I found does not work.