Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func getTumbnails(imageName: String) {
- // Create a reference to the file you want to download
- let tumbnailRef = storageRef.child("tumbs/(imageName)")
- // Create local filesystem URL
- let localURL: NSURL! = NSURL(string: "file:///local/tumbnails/(imageName)")
- // Download to the local filesystem
- let downloadTask = tumbnailRef.writeToFile(localURL) { (URL, error) -> Void in
- if (error != nil) {
- print(error)
- } else {
- let data = NSData(contentsOfURL: URL!)
- self.data = data!
- print(data)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement