Using .getDownloadURL() is giving me percentage encoded URLs from Firebase Storage. In this case I want to upload a file to the subfolder "images". Here is the upload code.
var metadata = {
contentType: "image/jpeg",
};
var imagesRef = storageRef.child("images");
var fileName = image.jpg;
var singleImageRef = imagesRef.child(fileName);
var path = singleImageRef.fullPath;
var uploadTask = storageRef
.child(path)
.put(fileName, metadata);
The URL returned looks like this: https://firebasestorage.googleapis.com/v0/b/app-name.appspot.com/o/images%2Fimage.jpg?alt=media&token=tokenstring
Which works - I'm taken to the correct image. But I want the URL to read: https://firebasestorage.googleapis.com/v0/b/app-name.appspot.com/o/images/image.jpg?alt=media&token=tokenstring
Is there some metadata I should be passing on upload to stop the percentage encoding happening?