private void prepareUploadParams(RequestElements requestElements) {
		Map<String, String> requestHeaders = requestElements.getRequestHeaders();
		UploadRequestElements uploadRequestElements = requestElements.getUploadRequestElements();
		String boundaryId = uploadRequestElements.getBoundaryId();
		String formMetadataName = "file_metadata_" + boundaryId.substring(0, 5) + "_" + uploadRequestElements.getElementsId();
		String formContentName = "file_content_" + boundaryId.substring(0, 5) + "_" + uploadRequestElements.getElementsId();
		String contentType = ContentTypes.getContentType(getSerializationRequestFormat());
		
		Attachable attachable = (Attachable) requestElements.getEntity();
		String fileName = (attachable.getFileName() != null) ? "; filename=\"" + attachable.getFileName() + "\"" : "";
		String fileType = (attachable.getContentType() != null) ? "Content-Type: " + attachable.getContentType() + "\r\n" : "";
		
		String entityBoundary = String.format(UploadRequestElements.TEMPLATE_ENTITY_BOUNDARY, boundaryId, formMetadataName, contentType);
		String contentBoundary = String.format(UploadRequestElements.TEMPLATE_CONTENT_BOUNDARY, boundaryId, formContentName, fileName, fileType);
		
		requestHeaders.put(RequestElements.HEADER_PARAM_CONTENT_TYPE, ContentTypes.MULTIPART_FORMDATA.toString() + "; boundary=" + boundaryId);
		
		uploadRequestElements.setBoundaryForEntity(entityBoundary);
		uploadRequestElements.setBoundaryForContent(contentBoundary);
	}
private void prepareUploadParams ( RequestElements requestElements ) { Map < String , String > requestHeaders = requestElements . getRequestHeaders ( ) ; UploadRequestElements uploadRequestElements = requestElements . getUploadRequestElements ( ) ; String boundaryId = uploadRequestElements . getBoundaryId ( ) ; String formMetadataName = "file_metadata_" + boundaryId . substring ( 0 , 5 ) + "_" + uploadRequestElements . getElementsId ( ) ; String formContentName = "file_content_" + boundaryId . substring ( 0 , 5 ) + "_" + uploadRequestElements . getElementsId ( ) ; String contentType = ContentTypes . getContentType ( getSerializationRequestFormat ( ) ) ; Attachable attachable = ( Attachable ) requestElements . getEntity ( ) ; String fileName = ( attachable . getFileName ( ) != null ) ? "; filename=\"" + attachable . getFileName ( ) + "\"" : "" ; String fileType = ( attachable . getContentType ( ) != null ) ? "Content-Type: " + attachable . getContentType ( ) + "\r\n" : "" ; String entityBoundary = String . format ( UploadRequestElements . TEMPLATE_ENTITY_BOUNDARY , boundaryId , formMetadataName , contentType ) ; String contentBoundary = String . format ( UploadRequestElements . TEMPLATE_CONTENT_BOUNDARY , boundaryId , formContentName , fileName , fileType ) ; requestHeaders . put ( RequestElements . HEADER_PARAM_CONTENT_TYPE , ContentTypes . MULTIPART_FORMDATA . toString ( ) + "; boundary=" + boundaryId ) ; uploadRequestElements . setBoundaryForEntity ( entityBoundary ) ; uploadRequestElements . setBoundaryForContent ( contentBoundary ) ; }
Method to prepare the request params for upload functionality

@param requestElements the request elements