파이어베이스 스토리지는 실시간 데이터베이스와 동일한 "동기화"기능을 제공하지 않습니다 (1GB 객체를 동기화하려고하는 것처럼 상상해보십시오 ...). 당신은 메타 데이터를 동기화하기 위해 데이터베이스를 사용하는 것이 좋습니다과 같이 파일 업로드에 (예 : 다운로드하는 URL 등) :
// Upload file to Firebase Storage
storageRef.putData(imageData).observeStatus(.Success) { (snapshot) in
// When the image has successfully uploaded, get it's download URL
let url = snapshot.metadata?.downloadURL()?.absoluteString
// Write data to the realtime database
dbRef.child("photos").childByAutoId().setValue(["name": snapshot.metadata?.name, "url": url])
}
...
dbRef.child("photos").observeEventType(.ChildAdded, withBlock: { (snapshot) -> Void in
// snapshot contains the name and URL of the uploaded file
});
Code이 Zero to App에서이다, I/O 2016에서 우리가했던 이야기, 어떤 약간 더 자세히 자세히