Hey, I have been having trouble with local file uploads in C#. My method is a POST request:
form.AddField("Content-Type","application/octet-stream");
form.AddField("api_key",mykey);
form.AddField("filetype","ogg");
form.AddField("url","/Users/myuserspace/Desktop/Oggs/music.ogg");
form.AddField("track",music.ogg);
form.AddBinaryData("--data-binary", @track);
But this gives an error: {"response": {"status": {"version": "4.2", "code": 5, "message": "method - Invalid parameter: "Content-Type""}}} All the info I've found suggests that this is valid. What am I doing wrong? In addition, I tried:
form.AddField("api_key",mykey);
form.AddField("filetype","ogg");
form.AddField("url","/Users/myuserspace/Desktop/Oggs/music.ogg");
I think the format for the local url is wrong, since this gives a 500 error. When I use a random file on the internet, it does work. I've never seen any c# examples, so I'm a little stuck.