         
         data.appendData("\r\n--\(boundary)--\r\n".dataUsingEncoding(NSUTF8StringEncoding)!)
         
+        /// Start uploading
         return Alamofire.upload( request, data: data )
     }
     
+    internal func upload() {
+        ButterflyFileUploader.sharedUploader.startUploading(request: self.request)
+    }
+    
+    // MARK: - Deinit
+    deinit {
+        
+    }
 }

//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  Largely based on this stackoverflow question: http://stackoverflow.com/questions/26121827/uploading-file-with-parameters-using-alamofire/28467829//

import Foundation
import Alamofire

        self.url = url
        self.fileName = name
        self.mimeType = "application/octet-stream"
        if let mimeType = mimeType {
            self.mimeType = mimeType
        }
        if let _name = url.lastPathComponent {
            fileName = _name
        }
        if let mimeType = mimeType, let _extension = url.pathExtension {
            switch _extension.lowercaseString {
            case "jpeg", "jpg":
                self.mimeType = "image/jpeg"
                
