protected Response upload(String name, File fileToUpload, String mediaTypeString, Object... pathArgs) throws IOException {
        URL url = getApiUrl(pathArgs);
        return (upload(name, fileToUpload, mediaTypeString, null, url));
    }
protected Response upload ( String name , File fileToUpload , String mediaTypeString , Object ... pathArgs ) throws IOException { URL url = getApiUrl ( pathArgs ) ; return ( upload ( name , fileToUpload , mediaTypeString , null , url ) ) ; }
Perform a file upload using the specified media type, returning
a ClientResponse instance with the data returned from the endpoint.

@param name the name for the form field that contains the file name
@param fileToUpload a File instance pointing to the file to upload
@param mediaTypeString the content-type of the uploaded file, if null will be determined from fileToUpload
@param pathArgs variable list of arguments used to build the URI
@return a ClientResponse instance with the data returned from the endpoint
@throws IOException if an error occurs while constructing the URL