I am attempting to upload a file (png in this this example) to google cloud storage but my request fails with the following 400 Bad Request response.
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Required"
}
],
"code": 400,
"message": "Required"
}
}
My POST request looks like this.
POST https://www.googleapis.com/upload/storage/v1/b/unit_tests/o?uploadType=media HTTP/1.1
Accept: application/json, text/json, text/x-json, text/javascript
Authorization: OAuth XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Content-Type: image/png
Host: www.googleapis.com
Transfer-Encoding: chunked
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
96DA5
�PNG
���
IHDR����������e�����sRGB�������gAMA����
�a��� pHYs�������o�d����IDATx^�|W��?o��������������,Y`I
*** FIDDLER: RawDisplay truncated at 128 characters. Right-click to disable truncation. ***
Per the documentation I've supplied the necessary paramters etc so I cannot see what is required that I am not providing.
You forgot to supply the name
parameter in the URL. See the Simple upload documentation for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With