I was trying to create a new file in the Firebase Storage with space characters in the file name, e.g:
Firebase.Storage.ref("path with space/image.png").put_file("res://image.png")
But it would fail, even if Firebase allows paths to have spaces. Turns out it was because the space character wasn't being encoded in the url parameter, only the forward slash / was.
Using the uri_encode(), it should encode both the slash and space characters, as well as any other character.
Same as #387, but for the
4.0
branch.I was trying to create a new file in the Firebase Storage with space characters in the file name, e.g:
But it would fail, even if Firebase allows paths to have spaces. Turns out it was because the space character wasn't being encoded in the url parameter, only the forward slash
/
was.Using the
uri_encode()
, it should encode both the slash and space characters, as well as any other character.