2

I'm trying to upload a file to Firebase storage using the web API, but the server return this error:

{
  "error": {
    "code": 400,
    "message": "Bad Request. Could not access bucket XXXX.appspot.com"
  }
}

I have so far:

BTW downloading file works just fine.

Christophe Le Besnerais
  • 3,895
  • 3
  • 24
  • 44

1 Answers1

2

Turns out I was calling the put method on my storage ref with a non valid path. With a proper file path it works.

Very misleading error message from firebase nevertheless...

Christophe Le Besnerais
  • 3,895
  • 3
  • 24
  • 44
  • Just wanted to say, I had a `Bad Request` because I tried to send a file as multipart in guzzle php, but that was wrong (for whatever reason). So even if the error is vague, it points in the right direction. – marcus Feb 25 '20 at 08:07