                 completionHandler?(error)
             } else {
                 self.data = data
-                completionHandler?(nil)
+                
+                if (file != nil && (parameters["input"] as? String) == "upload") {
+                    self.upload(file!,completionHandler: completionHandler)
+                }
+                else {
+                    completionHandler?(nil)
+                }
             }
         }
-        
 
         parameters.removeValueForKey("download")
         
-        let file: NSURL? = parameters["file"] as? NSURL
-        
-        if (file != nil && (parameters["input"] as? String) == "upload") {
-            parameters.removeValueForKey("file")
+        if(file != nil) {
+            parameters["file"] = file!.absoluteString
+        }
+        self.currentRequest = CloudConvert.req(.POST, URLString: self.url!, parameters: parameters).responseCloudConvertApi(startRequestComplete)
+        
+    
+        return self
+    }
+    
+    
+    /**
+     
+     Uploads an input file to the CloudConvert API
+     
+     :param: uploadPath        Local path of the input file.
+     :param: completionHandler   The code to be executed once the upload has finished.
+     
+     :returns: CloudConvert.Process
+     
+     */
+    
+    public func upload(var uploadPath: NSURL, completionHandler: ((NSError?) -> Void)?) -> Self {
+    
+        
+        if let upload = self.data?["upload"] as? NSDictionary, var url = upload["url"] as? String  {
+            
+            url += "/" + uploadPath.lastPathComponent!
             
             let formatter = NSByteCountFormatter()
             formatter.allowsNonnumericFormatting = false
-            
-            self.currentRequest = CloudConvert.upload(self.url!, parameters: parameters, file: file!).progress { (bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) in
-                let percent: Float = Float(totalBytesWritten) / Float(totalBytesExpectedToWrite) * 100
-                let message = "Uploading (" + formatter.stringFromByteCount(totalBytesWritten) + " / " + formatter.stringFromByteCount(totalBytesExpectedToWrite) + ") ..."
-                self.delegate?.conversionProgress(self, step: "upload", percent: percent, message: message)
-                self.progressHandler?(step: "upload", percent: percent, message: message)
-            }.responseCloudConvertApi(startRequestComplete)
+
+            self.currentRequest = CloudConvert.upload(url, file: uploadPath)
+                .progress { (bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) in
+                
+                    let percent: Float = Float(totalBytesWritten) / Float(totalBytesExpectedToWrite) * 100
+                    let message = "Uploading (" + formatter.stringFromByteCount(totalBytesWritten) + " / " + formatter.stringFromByteCount(totalBytesExpectedToWrite) + ") ..."
+                    self.delegate?.conversionProgress(self, step: "upload", percent: percent, message: message)
+                    self.progressHandler?(step: "upload", percent: percent, message: message)
+                
+                }
+                .responseCloudConvertApi { (_, _, data, error) -> Void in
+                    self.currentRequest = nil;
+                    if(error != nil) {
+                        completionHandler?(error)
+                    } else {
+                        completionHandler?(nil)
+                    }
+                }
+
+            
         } else {
-            if(file != nil) {
-                parameters["file"] = file!.absoluteString
-            }
-            self.currentRequest = CloudConvert.req(.POST, URLString: self.url!, parameters: parameters).responseCloudConvertApi(startRequestComplete)
-        }
+            completionHandler?(NSError(domain: errorDomain, code: -1, userInfo: ["localizedDescription" : "File cannot be uploaded in this process state!"] ))
+        }
+        
+        
+
     
         return self
     }
-    
-
     
     /**
     

            return self
        }
        
        
        let startRequestComplete : (NSURLRequest, NSHTTPURLResponse?, AnyObject?, NSError?) -> Void = { (_, _, data, error) -> Void in
            self.currentRequest = nil;

    
    let encoding: Alamofire.ParameterEncoding = .URL
    
    let request: NSURLRequest = (encoding.encode(URLRequest(Alamofire.Method.PUT, URLString: URLString), parameters: parameters).0).mutableCopy() as! NSMutableURLRequest

    return manager.upload(request, file: file)
    
}

