DEV Community

Discussion on: How can I upload pdf files in Egnyte using Rest API and Java

Collapse
 
priyamuthuvel profile image
Priyadarsini • Edited

public static void main(String[] args) {
File testupload=new File("C:\Users\MSTSYS0\renamedfile\a.png");
RestAssured.baseURI="apidemo.egnyte.com/pubapi/v1/fs/Sh...";
Response response=given()
.multiPart(testupload)
.when().
post("/Uploads");
System.out.println(response.getStatusCode());
System.out.println(response.asString());
}

Collapse
 
niranjandamle profile image
Niranjan Damle

Did you get this to work? if yes, can you please share some sample code?