Hi
I am trying to upload a file to the server with an arduino yun. The file is located on the sd card. The server side function gets called succesfully but it doesn't receive a file. The server returns a string "error", "succes", "no file" as result, and it always return "no file". This is my code to send the file. I am trying it with a 'curl' command. (The server side is a .NET MVC project.)
void uploadLogFile(){
Serial.println(F("Uploading Log File"));
Process post;
post.begin("curl");
post.addParameter("-X");
post.addParameter("POST");
post.addParameter("--d");
post.addParameter("file=@/mnt/sd/datalog.txt");
post.addParameter("http://xxxxxxxx/LogFile/Submit");
post.run();
if (checkProcessResult(post, "succes") == 1){
Serial.println("File upload succes");
}
}
