         //---------------------------------------------------------------------------
     }
     //---------------------------------------------------------------------------
-    func uploadString(string: String, fileName: String = "Casted.swift", isPublic: Bool = true) {
+    func uploadTextData(string: String, fileName: String = "Casted.swift", isPublic: Bool = true, success:(NSURL)->()) {
         //TODO: Add GitHub login support
         let content = [
-            "description":"Generated with Cast (www.castshare.io)",
-            "public":true,
+            "description": "Generated with Cast (www.castshare.io)",
+            "public": true,
             "files":
                 [fileName:
                     ["content": string]

            if let data = data {
                //FIXME: Catch the eventual throw for uploadString
                let jsonObj = try! NSJSONSerialization.JSONObjectWithData(data, options: .AllowFragments) as! NSDictionary
                if let url = jsonObj["html_url"] as? String {
                    self.shortenURL(url, successBlock: { (url) in
                        if let url = url {
                            self.pasteboard.copyToClipboard([url])
                            recentUploads[String(url)] = String(url)
                            appDelegate.statusBar.statusBarItem.menu?.update()
                            print(recentUploads)
                        }
                    })
                }
            } else {
                print(error!.localizedDescription)

                if statusCode == 200 {
                    if let urlString = jsonObj["data"]!["url"]! as? String {
                        if let url = NSURL(string: urlString) {
                            success(url)
                        }
                    }
                }
            } else {
                print(error?.localizedDescription)
