         }
     }
 
-    func getUniqueFilename(date: NSDate, imageData: NSData) -> String {
+    func getUniqueFilename(date: NSDate, fileData: NSData) -> String {
         let dateFormatter = NSDateFormatter()
         let enUSPosixLocale = NSLocale(localeIdentifier: "en_US_POSIX")
         dateFormatter.locale = enUSPosixLocale
         dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ"
         let formattedDate = dateFormatter.stringFromDate(date)
 
-        let hash = imageData.crc32()
+        let hash = fileData.crc32()
 
         return formattedDate + "_" + hash!.toHexString()
     }

    @IBAction func backupPhotos(sender: UIButton) {
        dismissKeyboard()

        let assets = PHAsset.fetchAssetsWithMediaType(PHAssetMediaType.Image, options: nil)

        dispatch_async(dispatch_get_global_queue(Int(QOS_CLASS_USER_INITIATED.rawValue), 0)) {
            self.lockScreen()

            return finalFileName
        } else {
            self.updateStatus("Uploading " + finalFileName + " to temporary file...", count: index, total: totalNumber)
            var success = sftpSession.writeContents(fileData, toFileAtPath: tempFilePath,
                                      progress: { sent in
                                        self.updateStatus("Uploading " + finalFileName + " to temporary file...", count: index, total: totalNumber, percentage: Float(sent) / Float(localFileLength))
                                        return true
