diff --git a/dist/build-full.jardesc b/dist/build-full.jardesc index 92e0052f..e046ff51 100644 --- a/dist/build-full.jardesc +++ b/dist/build-full.jardesc @@ -1,6 +1,6 @@ - + diff --git a/src/com/androidquery/callback/AbstractAjaxCallback.java b/src/com/androidquery/callback/AbstractAjaxCallback.java index a59a302b..43bc278d 100644 --- a/src/com/androidquery/callback/AbstractAjaxCallback.java +++ b/src/com/androidquery/callback/AbstractAjaxCallback.java @@ -1610,8 +1610,10 @@ private static void writeObject(DataOutputStream dos, String name, Object obj) t if(obj == null) return; if(obj instanceof File){ + File file = (File) obj; writeData(dos, name, file.getName(), new FileInputStream(file)); + }else if(obj instanceof byte[]){ writeData(dos, name, name, new ByteArrayInputStream((byte[]) obj)); }else{ @@ -1620,7 +1622,7 @@ private static void writeObject(DataOutputStream dos, String name, Object obj) t } - + private static void writeData(DataOutputStream dos, String name, String filename, InputStream is) throws IOException { dos.writeBytes(twoHyphens + boundary + lineEnd);