[ASK] Arduino yun upload data into webserver

Hi all,

I am new in arduino yun, I have a question, it is possible to upload data into webserver using arduino yun without wifi shield? Thanks before

The Yun includes WiFi so there is no need to add a shield.

It also has an Ethernet connector if you don't want to use WiFi - your question is ambiguous.

...R

hmmmm so it is possible to use only yun to send the data. do you have the tutorial about this one? Thanks before

curl -i -F name=test -F filedata=@/mnt/sda1/localfile.jpg http://example.org/upload.php
nano /mnt/sda1/upload.sh
#!/bin/ash
curl -i -F name=test -F filedata=@/mnt/sda1/localfile.jpg http://example.org/upload.php
chmod  755  /mnt/sda1/upload.sh

"upload.php" code:

<?php
// Example of accessing data for a newly uploaded file
$fileName = basename($_FILES["filedata"]["name"]); 
$fileTmpLoc = $_FILES["filedata"]["tmp_name"];
// Path and file name
$pathAndName = "/home/uploads/".$fileName;
// Run the move_uploaded_file() function here
$moveResult = move_uploaded_file($fileTmpLoc, $pathAndName);
// Evaluate the value returned from the function if needed
if ($moveResult == true) {
    echo "File has been moved from " . $fileTmpLoc . " to" . $pathAndName;
} else {
     echo "ERROR: File not moved correctly";
}
?>

ATmega32u4 Code:

#include <Process.h>
void setup() {
  Bridge.begin();   // Initialize the Bridge
  uploadfiles();
}
void loop() { }
void uploadfiles() {
  Process p;
  p.runShellCommand("/mnt/sda1/upload.sh");
  while (p.running());
}

CANNED ANSWER

= [Q:] How do I send data to an internet web server? =

If you want just Linux side, there are solution that people have documented.

google: arduino yun curl python

Good Articles:

Of course, you can use python, lua, ash (shell), and CURL

Is this enough? Or are you looking for more?

Jesse