I am sure its possible in Drupal also.
Here is the reference for Java code
and
http://stackoverflow.com/questions/8989937/form-post-through-rest-client-multipart-upload
But how can I implement for Drupal?
I want to upload/post a file to Drupal site using services module(without base64 encoding).
File uploading with base64 encode using Services module is working fine. I have followed this tutorial
But I need to Post file without base64 encode.
I have tried following steps.But that’s not working (I am using Chrome extension Postman)
Step 1:
I have added Header like:
Cookie: XXXXXXXXXXXXXXXXXXXXXXXXXXXX
Content-Type: multipart/form-data
X-CSRF-token: O7XJHc4DZOVTLSpgRQgF-XD5VD7QFkBpo7QIW8pfN7g
Step 2:
Body parameters
file[file]: Choose files
file[filename]: myfilename.jpg
file[filepath]: public://my1.jpg
After following above steps I am getting error “Missing data the file upload can not be completed”
I am using Drupal 7 and Services 3