Hi Arnab,
Yes from what I can see I've followed your instructions - and the file does get uploaded - it just seems to be corrupt for some reason.
I've tried with an image and got the same result.
This is how it looks (I've tried making tweaks to what you provided but same result):
--foo_bar_baz content-disposition: form-data; name="metadata"; filename="test.png" content-type: application/json
{"name":"test.png","mimeType":"image/png"} --foo_bar_baz content-disposition: form-data; name="file"; filename="test.png" content-type: image/png
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAJYCAMAAACJuGjuAAACdlBMVEUBCQMcHBIZHA8dGw0XGhAVGA4UFwwBBgICDAMDDwQSFgsPGA4eHA8QFAgXGQ0bGAweHBMOEgcXFwscHBAFEQYlHhQLFQsMEgYlHBIoHA4VFwkc.. etc --foo_bar_baz--
And I get my response like so: { "kind": "drive#file", "id": "13Htxa1Lcfk_VyDDtZPj0yYBrs2_zwO4u", "name": "test.png", "mimeType": "image/png" }
Let me know if you have any ideas. Thanks, Kevin
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Arnab,
Yes from what I can see I've followed your instructions - and the file does get uploaded - it just seems to be corrupt for some reason.
I've tried with an image and got the same result.
This is how it looks (I've tried making tweaks to what you provided but same result):
--foo_bar_baz
content-disposition: form-data; name="metadata"; filename="test.png"
content-type: application/json
{"name":"test.png","mimeType":"image/png"}
--foo_bar_baz
content-disposition: form-data; name="file"; filename="test.png"
content-type: image/png
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAJYCAMAAACJuGjuAAACdlBMVEUBCQMcHBIZHA8dGw0XGhAVGA4UFwwBBgICDAMDDwQSFgsPGA4eHA8QFAgXGQ0bGAweHBMOEgcXFwscHBAFEQYlHhQLFQsMEgYlHBIoHA4VFwkc.. etc
--foo_bar_baz--
And I get my response like so:
{
"kind": "drive#file",
"id": "13Htxa1Lcfk_VyDDtZPj0yYBrs2_zwO4u",
"name": "test.png",
"mimeType": "image/png"
}
Let me know if you have any ideas.
Thanks,
Kevin