如何避免将照片替换为Firebase存储

时间:2017-06-23 21:43:10

标签: ios swift firebase swift3 firebase-storage

每次上传重命名时如何获取myImage.png,以免在Firebase存储中被替换?

    let storageRef = Storage.storage().reference().child("myImage.png")
    if let uploadData = UIImagePNGRepresentation(self.myImageView.image!){

        storageRef.putData(uploadData, metadata: nil, completion:
            {
                (metadata, error) in
                if error != nil {
                    print("error")
                    return
                }

0 个答案:

没有答案