I understand the Drupal Services Module, and have node creation, and user authentication working. I am trying to upload a file (an image) from android that will populate a node image field. My understanding of Services is pretty good. I have enabled the file resource in my service. I assume to create the file, I will POST my data to my-server/service-endpoint/create. The big question I can’t find anywhere is what data is needed, and what is the structure of the JSON that I will send since I will be using JSON as the interface?
I understand the Drupal Services Module, and have node creation, and user authentication working.
Share
Very simple this one.. The data is here…
http://drupanium.org/api/82
Then just recreate the array they list as a JSON object.. only required parameter is file.. so
{“file”:FILE_NAME}
The correct url is http://www.my-site.com/%5BREST-ENDPOINT%5D/file and then POST the data.