var selectedfile;
function upload()
{
selectedfile= document.getElementById("file");
var filename=selectedfile.files.item(0).name;
var storageRef=firebase.storage().ref('/Images/'+filename);
var uploadTask=storageRef.put(selectedfile);
uploadTask.on('state_changed',function(snapshot){},function(errors){},
function(){
var downloadUrl=uploadTask.snapshot.downloadUrl;
console.log(downloadUrl);
});
}
<input type="file" name="fileid" id="file">
<button onclick="upload();" id="selbt">Upload</button>
While I am trying to upload images to my Firebase Storage it threw my some uncaught exception like:
It is saying invalid argument as 'put'. Can anyone please help in solving this issue.
formand use the next attributeenctype="multipart/form-data- Gerardo BLANCO