tag:blogger.com,1999:blog-9148683707845127605.post7960183537135209783..comments2022-03-24T20:05:52.272-07:00Comments on Sam's Technical Blog: Android Multipart uploadSam Josephhttp://www.blogger.com/profile/10788506730233381803noreply@blogger.comBlogger27125tag:blogger.com,1999:blog-9148683707845127605.post-20548373967741588162014-03-23T22:48:48.399-07:002014-03-23T22:48:48.399-07:00some of the functions are deprecated from multipar...some of the functions are deprecated from multipart in mime<br /><br /> org.apache.http.entity.mime.MultipartEntity;<br /><br />import org.apache.http.entity.mime.content.ContentBody;<br /><br /><br /><br />how to solve ?Sam Josephhttps://www.blogger.com/profile/10788506730233381803noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-33750991711273561322013-02-01T05:15:24.660-08:002013-02-01T05:15:24.660-08:00Sorry guys, haven't worked on this in a long t...Sorry guys, haven't worked on this in a long time - if you'd like to learn more about mobile from me, please check out my online mobile class: <br /><br />https://sites.google.com/site/hpumobilespring2013<br /><br />and send me your gmail address if you'd like to take partSam Josephhttps://www.blogger.com/profile/10788506730233381803noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-59654001013343014642013-02-01T05:08:24.345-08:002013-02-01T05:08:24.345-08:00Hi Sam,
I am getting "HTTP/1.1 415 Unsupport...Hi Sam,<br /><br />I am getting "HTTP/1.1 415 Unsupported Media Type" in response,<br /><br />please suggest me to solve this thing.<br /><br />ThanksAnonymoushttps://www.blogger.com/profile/15755964067697150536noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-44152016396018967052011-06-13T01:39:17.628-07:002011-06-13T01:39:17.628-07:00can you show an server side code that save the dat...can you show an server side code that save the data?<br /><br />I am actually using a asp.net/C# web service to receive the file, but don't know how.abchttps://www.blogger.com/profile/14751886458910470420noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-22555008459361936442011-06-01T04:12:56.551-07:002011-06-01T04:12:56.551-07:00Hi...
Thank you very much for the post. I surfed ...Hi... <br />Thank you very much for the post. I surfed in net and got to see so many blogs but none were as simple and easy as yours. Great work... Again thanks ..<br /><br />For those of you who are struggling to find the proper jars, here is the link: http://www.findjar.com/index.x?query=apache-mime4j-0.5.jar <br /><br />Posted by Santhosh Horatti to Sam's Technical Blog at June 1, 2011 3:04 AM - <br /><br />I accidentally deleted this when trying to publish it ... Damn iPhone links ...Sam Josephhttps://www.blogger.com/profile/10788506730233381803noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-30282966283346301452011-04-28T12:23:25.378-07:002011-04-28T12:23:25.378-07:00it works fine... thanks a lot!!!it works fine... thanks a lot!!!William Ariashttps://www.blogger.com/profile/13379347848495260476noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-38272779608524351022011-03-03T08:38:33.756-08:002011-03-03T08:38:33.756-08:00Hi,
For some reason I get a red wiggly line under...Hi,<br /><br />For some reason I get a red wiggly line under my httpPost(url);<br />says there is no constructor to support this.How can I get around this.<br />plz helpPriyankahttps://www.blogger.com/profile/04545741660398391322noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-26689950289460255202010-06-17T08:20:10.894-07:002010-06-17T08:20:10.894-07:00This was incredibly useful, thanks a lot!This was incredibly useful, thanks a lot!Simonhttps://www.blogger.com/profile/18234993009806158588noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-57862205909574992052010-06-17T08:19:53.185-07:002010-06-17T08:19:53.185-07:00This was incredibly useful, thanks a lot!This was incredibly useful, thanks a lot!Simonhttps://www.blogger.com/profile/18234993009806158588noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-86630789217525752742010-05-12T04:09:03.771-07:002010-05-12T04:09:03.771-07:00hi if5_2009_20010,
Yes u can. The main issue is ...hi if5_2009_20010,<br /> Yes u can. The main issue is that u must kept a file in the server to receive your file.<br />Thats all.<br />Thanksmainuhttps://www.blogger.com/profile/01312189546881498441noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-89092900276361586322010-05-12T04:04:06.895-07:002010-05-12T04:04:06.895-07:00I already develop a servlet class that receives th...I already develop a servlet class that receives the image<br />but nothing sent by using this technique (multipart upload)<br />and with other (BasicNameValuePair) it works.<br />i don't know the raisonsUnknownhttps://www.blogger.com/profile/07130655127611965475noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-22594592059113514822010-05-12T03:45:48.266-07:002010-05-12T03:45:48.266-07:00thanks for your answer mainu ,it's clear for m...thanks for your answer mainu ,it's clear for me now,<br />but can i creat the file in the serveur using JSp or servlet because i have not practising php language well.Unknownhttps://www.blogger.com/profile/07130655127611965475noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-67209709623700784132010-05-11T21:54:57.677-07:002010-05-11T21:54:57.677-07:00Hi if5_2009_20010
To upload the file in the se...Hi if5_2009_20010 <br /> To upload the file in the server a php file must be created in the server.Just check it, because it might be already created there.U can find the format in developers blogs.<br />I can give you a link:http://www.mail-archive.com/android-beginners@googlegroups.com/msg17389.html<br />.Now here the the variable name given for the uploaded file in the serever must be same with the variable u used in the line.. dos.writeBytes("Content-Disposition: form-data; name=\"userfile\";filename=\"" + exsistingFileName +"\"" + lineEnd); <br />Here I change the file name as "userfile\" because this is used in my php file. Thats enough.Try it.<br /><br />Best of luckmainuhttps://www.blogger.com/profile/01312189546881498441noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-56067805303529489672010-05-11T07:27:09.453-07:002010-05-11T07:27:09.453-07:00hi ,
please mainu or any body if you can tel me h...hi ,<br /><br />please mainu or any body if you can tel me how you 're<br /><br />resolving this problem ,because i try the multipart uoload without errors but is not arrived to the destinationUnknownhttps://www.blogger.com/profile/07130655127611965475noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-12155633381347746072010-05-11T07:27:09.454-07:002010-05-11T07:27:09.454-07:00This comment has been removed by the author.Unknownhttps://www.blogger.com/profile/07130655127611965475noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-38074828113247552522010-05-11T07:25:22.176-07:002010-05-11T07:25:22.176-07:00This comment has been removed by the author.Unknownhttps://www.blogger.com/profile/07130655127611965475noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-7782936662480494202010-05-11T07:22:36.697-07:002010-05-11T07:22:36.697-07:00This comment has been removed by the author.Unknownhttps://www.blogger.com/profile/07130655127611965475noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-83223845238958806872010-05-10T04:12:19.412-07:002010-05-10T04:12:19.412-07:00Hi Sam
I am able to overcome the problem.
Than...Hi Sam <br /><br />I am able to overcome the problem.<br /><br /> Thanksmainuhttps://www.blogger.com/profile/01312189546881498441noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-78645853557192022912010-05-10T01:03:21.693-07:002010-05-10T01:03:21.693-07:00Hi Sam,
I am doing file uploading in the server...Hi Sam,<br /> I am doing file uploading in the server for my application. Your tutorial becomes very help full for me.Thanks.<br /> Now I faced the problem for the .jar files. I am using android sdk2.1 in windows with eclipse(Ganymede).<br />There is no error in compilation and execution. But the file is not viewed in the server.At the debugging the log shows the following error::<br />eclipse.buildId=M20080911-1700<br />java.version=1.6.0_06<br />java.vendor=Sun Microsystems Inc.<br />BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US<br />Command-line arguments: -os win32 -ws win32 -arch x86<br /><br /><br />"Error<br />Unknown javadoc format for append(char[]) [in StringBuffer [in StringBuffer.class [in java.lang [in C:\android-sdk-windows-1.5_r3\android-sdk-windows-1.5_r3\platforms\android-2.1\android.jar]]]]"<br />please help..mainuhttps://www.blogger.com/profile/01312189546881498441noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-85580160211251153802010-03-15T12:05:57.856-07:002010-03-15T12:05:57.856-07:00According to internet note, you can't use loca...According to internet note, you can't use localhost or 127.0.0.1 on Android Emulator or you get a connection refused.<br /><br />Also, how do you pass in arguments using this stuff?Unknownhttps://www.blogger.com/profile/15051530883520873624noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-85203752162947194912010-02-23T08:39:56.802-08:002010-02-23T08:39:56.802-08:00Just wanted to thank you for this. I didn't wa...Just wanted to thank you for this. I didn't want this for an Android app at all (although I have done Android hacking - those of you who use Donut custom ROMs are almost certainly using my BetterBrowser :) but it seems this is the only resource on the intertubes that gives a simple code example for doing multipart posts in httpclient 4.x. It beggars belief that all the resources, even from Apache themselves, suggest it's not possible without a huge amount of faffing about.Paul Nevehttps://www.blogger.com/profile/00504285231024777819noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-64786830281427544552010-02-09T17:44:07.303-08:002010-02-09T17:44:07.303-08:00They are from the apache HTTPClient project:
http...They are from the apache HTTPClient project:<br /><br />http://hc.apache.org/httpclient-3.x/Sam Josephhttps://www.blogger.com/profile/10788506730233381803noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-32636336117191358132010-02-08T14:36:30.890-08:002010-02-08T14:36:30.890-08:00Where exactly can I find these .jar files? I'm...Where exactly can I find these .jar files? I'm running Windows so getting the source and compiling it isn't exactly the easiest thing to do (seemingly).Austin Hhttps://www.blogger.com/profile/18279974645082136134noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-50375248443718009752009-09-24T09:45:19.417-07:002009-09-24T09:45:19.417-07:00Hi Klondike,
In this example 'media_entity...Hi Klondike,<br /><br />In this example 'media_entity' is just a string like "image/jpg" or something. It's the String component of the multipart upload that consists of one String and one File.<br /><br />Sorry for any confusion and good luck.Sam Josephhttps://www.blogger.com/profile/10788506730233381803noreply@blogger.comtag:blogger.com,1999:blog-9148683707845127605.post-67886735363630685292009-09-23T19:22:40.694-07:002009-09-23T19:22:40.694-07:00Thank you so much for posting this, I'm trying...Thank you so much for posting this, I'm trying to do this and I don't understand why it's so hard!<br /><br />So in this example, what's the "media_entity" and what's its relation to "file"?Klondikehttps://www.blogger.com/profile/07038776590094266043noreply@blogger.com