     
     let encoding: Alamofire.ParameterEncoding = .URL
     
-    let request: NSMutableURLRequest = (encoding.encode(URLRequest(Alamofire.Method.GET, URLString: URLString), parameters: parameters).0).mutableCopy() as! NSMutableURLRequest
-    // set method to GET first to let Alamofire encode it as query parameters
-    request.HTTPMethod = "POST"
-
-    
-    let boundary = "NET-POST-boundary-\(arc4random())-\(arc4random())"
-  
-    request.setValue("multipart/form-data;boundary=" + boundary, forHTTPHeaderField: "Content-Type")
-    
-    let postdata = NSMutableData()
-    for s in ["\r\n--\(boundary)\r\n",
-        "Content-Disposition: form-data; name=\"file\"; filename=\"\(file.lastPathComponent!)\"\r\n",
-        "Content-Type: application/octet-stream\r\n\r\n"] {
-            postdata.appendData(s.dataUsingEncoding(NSUTF8StringEncoding)!)
-    }
-    postdata.appendData(NSData(contentsOfURL: file)!)
-    postdata.appendData("\r\n--\(boundary)--\r\n".dataUsingEncoding(NSUTF8StringEncoding)!)
-
-    
-    return manager.upload(request, data: postdata)
-    
-
+    let request: NSURLRequest = (encoding.encode(URLRequest(Alamofire.Method.PUT, URLString: URLString), parameters: parameters).0).mutableCopy() as! NSMutableURLRequest
+
+    return manager.upload(request, file: file)
     
 }
 

                completionHandler?(error)
            } else {
                self.data = data
                completionHandler?(nil)
            }
        }
        

        parameters.removeValueForKey("download")
        
        let file: NSURL? = parameters["file"] as? NSURL
        
        if (file != nil && (parameters["input"] as? String) == "upload") {
            parameters.removeValueForKey("file")
            
            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)
        } else {
            if(file != nil) {
                parameters["file"] = file!.absoluteString
            }
            self.currentRequest = CloudConvert.req(.POST, URLString: self.url!, parameters: parameters).responseCloudConvertApi(startRequestComplete)
        }
    
        return self
    }
    

    
    /**
    

            return self
        }
        
        let file: NSURL? = parameters["file"] as? NSURL
        
        
        let startRequestComplete : (NSURLRequest, NSHTTPURLResponse?, AnyObject?, NSError?) -> Void = { (_, _, data, error) -> Void in
            self.currentRequest = nil;
