Skip to content

Commit 7da907c

Browse files
author
Caitlin Bales (MSFT)
committed
Remove image part
Doesn't really save much code and is confusing because an image can be many types other than jpeg
1 parent 88f0cb6 commit 7da907c

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/main/java/com/microsoft/graph/models/extensions/Multipart.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,6 @@ public void addHtmlPart(String name, String content) throws IOException {
8585
addPart(name, "text/html", content);
8686
}
8787

88-
/**
89-
* Add an image/jpeg part to the multipart body
90-
* @param name The name of the part
91-
* @param imageFile The image file
92-
* @throws IOException Throws an exception if the output stream cannot be written to
93-
*/
94-
public void addImagePart(String name, java.io.File imageFile) throws IOException {
95-
addFilePart(name, "image/jpeg", imageFile);
96-
}
97-
9888
/**
9989
* Add a file part to the multipart body
10090
* @param name The name of the part

src/test/java/com/microsoft/graph/functional/OneNoteTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public void testMultipartPost(){
404404
File pdfFile = new File("src/test/resources/document.pdf");
405405

406406
multipart.addHtmlPart("Presentation", htmlContent);
407-
multipart.addImagePart("hamilton", imgFile);
407+
multipart.addFilePart("hamilton", "image/jpg", imgFile);
408408
multipart.addFilePart("metadata", "application/pdf", pdfFile);
409409

410410
// Add multipart request header

0 commit comments

Comments
 (0)