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(https://www.drupal.org/node/2195165)
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
Screen shot : http://prntscr.com/7svsyz
Step 2: Body parameters
file[file]: Choose files
file[filename]: myfilename.jpg
file[filepath]: public://my1.jpg
Screen shot : http://prntscr.com/7svsve
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
Comments
I don't believe this is
I don't believe this is possible. Why are you trying to do it?
Contact me to contract me for D7 -> D10/11 migrations.
Dont want to use base64
@Jaypan thanks for reply. The main reason for this is I dont want file first encoded then it will be posted to Drupal. I want directly posted to Drupal using services module. (without encoding) . There are number of reason to not using base64. Base64 encoded files are larger than the original. So it will be used for small image.
I believe there must be some solution where we can post images directly to Drupal using services module.
Good luck, let us know if you
Good luck, let us know if you find one.
Contact me to contract me for D7 -> D10/11 migrations.
Solution
Hey Firoz,
Did you find the solution for this? If yes, then please share how did you achieved this. We are also looking for the same.
Thanks!
No
No. I don't found that solution. At that time I have used Base64 only. However I had also asked the same questions on stackoverflow, but no one has answered.
https://drupal.stackexchange.com/questions/165565/post-upload-file-using...
Trying same but just with videos
Hello Firoz2456,
I am also trying the same but my motive is to upload video files to Drupal 7 website via using vb.net front end desktop application.
So, have you got way to upload file to Drupal website?
Thank you,