-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from user4me/fix/#19_playlist_picture_upload
fix(#19): Playlist picture upload implementation
- Loading branch information
Showing
10 changed files
with
197 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package api.deezer.http; | ||
|
||
public class HttpRequestFilePart { | ||
|
||
private String name = null; | ||
private String filename = null; | ||
private String contentType = null; | ||
private String contentTransferEncoding = null; | ||
private byte[] value = null; | ||
|
||
public HttpRequestFilePart(final String name, final byte[] value) { | ||
this.name = name; | ||
this.value = value; | ||
} | ||
|
||
public static HttpRequestFilePart image(final String name, final byte[] value){ | ||
HttpRequestFilePart image = new HttpRequestFilePart(name, value); | ||
image.setContentType("image/png"); | ||
image.setFilename("image.png"); | ||
return image; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public String getFilename() { | ||
return filename; | ||
} | ||
|
||
public void setFilename(String filename) { | ||
this.filename = filename; | ||
} | ||
|
||
public String getContentType() { | ||
return contentType; | ||
} | ||
|
||
public void setContentType(String contentType) { | ||
this.contentType = contentType; | ||
} | ||
|
||
public String getContentTransferEncoding() { | ||
return contentTransferEncoding; | ||
} | ||
|
||
public void setContentTransferEncoding(String contentTransferEncoding) { | ||
this.contentTransferEncoding = contentTransferEncoding; | ||
} | ||
|
||
public byte[] getValue() { | ||
return value; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters