         
         return isMultiPart
     }
-}+}

    :param: parameters  the request parameters.
    :param: credential  the credentials to use for basic/digest auth (Note: it is advised that HTTPS should be used by default).
    :param: method      the method to be used, by default a .POST request.
    :param: progress    a block that will be invoked to report progress during upload.
    :param: completionHandler A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: The object created from the response data of request and the `NSError` object describing the network or parsing error that occurred.
    */
    public func upload(url: String,  file: NSURL, parameters: [String: AnyObject]? = nil, credential: NSURLCredential? = nil, method: HttpMethod = .POST, progress: ProgressBlock?, completionHandler: CompletionBlock) {
        fileRequest(url, parameters: parameters, method: method, credential: credential, type: .Upload(.File(file)), progress: progress, completionHandler: completionHandler)
    }
    
    /**

                delegate.uploadProgress = progress
                delegate.completionHandler = completionHandler
                delegate.credential = credential
                delegate.responseSerializer = responseSerializer
                
                self.delegate[task] = delegate
            }
