Skip to content

Commit

Permalink
Merge pull request #30 from fngr/Upload-image-fix
Browse files Browse the repository at this point in the history
Extension and content type problems solved on uploads
  • Loading branch information
brettcvz committed Nov 7, 2013
2 parents 46b7d19 + 9fa6c26 commit 3a65a24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion filepicker-library/src/io/filepicker/FilePickerAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,10 @@ public FPFile uploadFileToTemp(Uri contentURI, Context context)
ByteArrayEntity entity = new ByteArrayEntity(
readBinaryInputStream(context.getContentResolver()
.openInputStream(contentURI)));
entity.setContentType("image/jpg");
httppost.setEntity(entity);
entity.setChunked(false);
httppost.setHeader("X-File-Name", "testfile.file");
httppost.setHeader("X-File-Name", "testfile.jpg");
httppost.setHeader("Content-Type", "application/octet-stream");
String response = getStringFromNetworkRequest(httppost);
try {
Expand Down

0 comments on commit 3a65a24

Please sign in to comment.