func addPic(){
let imageRef = storageRef.child(“images/unknown.jpeg”)
let image = URL(string: “/Users/muhaimiemohd/Desktop/Unknown.jpeg”)
let metadata = FIRStorageMetadata()
metadata.contentType = "image/JPEG"
imageRef.putFile(image!, metadata: metadata, completion: {(metadata,error) in
if error == nil{
print("succeed")
}else{
print(error?.localizedDescription)
}
})
}
// what is wrong with the url i added bcs when i tried to run it…the debugging keep looping without stop and the storage didnt added in firebase.