Hello,
I am working on Linux (Ubuntu) and I have written the following function in order to
upload a JSON file (server with ‘url’ adress):
URLExecute[url, "BodyData" ->"{"a"->"b"}","Method" -> "PUT"]
It works fine for Linux.
But it should also work on a Windows Server…
-
Is the “Method”->“PUT” based on cURL?
-
Is there another function or a workaround for Windows?
Thanks!
Gordon
Hello,
I think the key is the username/password restriction (maybe Windows is more conservative…
URLFetch[url, "BodyData" ->"{"a"->"b"}","Method" -> "PUT", "Username"->"...", "Password"->"..."]
works fine. I switched to URLFetch due to MM9
Cheers!
Gordon
Hi again,
how can I manage to upload images (e.g. JPG or PNG) to a server?
f=Import["image.jpg","JPEG"]
URLExecute["url",
"Method" -> "PUT", "BodyData" -> f, Username->"...", Password->"..."]
does not work:
General::erropts: The value XXX specified for the option BodyData is invalid.
The uplaod with cURL is possible (webdav is installed)
Thanks!
Gordon