package com.groupdocsdev.classes; import com.groupdocs.cloud.conversion.api.*; import com.groupdocs.cloud.conversion.model.*; import com.groupdocs.cloud.conversion.model.requests.*; import com.groupdocs.cloud.conversion.client.Configuration; import com.groupdocs.cloud.conversion.client.ApiException; import java.io.File; // Upload File to Cloud Storage using Java public class App { public static void main(String[] args) { // Create an instance of the convert API FileApi apiInstance = new FileApi(configuration); try { File fileStream = new File("H:\\groupdocs-cloud-data\\input-sample-file.xlsx"); UploadFileRequest request = new UploadFileRequest("java-testing\\input-sample-file.xlsx", fileStream, MyStorage); FilesUploadResult response = apiInstance.uploadFile(request); System.out.println("Expected response type is FilesUploadResult: " + response.getUploaded().size()); } catch (ApiException e) { System.err.println("Exception while calling FileApi:"); e.printStackTrace(); } } }