Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You maybe able to get it working using the Java/JavaScript bridge to submit the form for you (using a WebView). But my guess is it would be more trouble than it's worth. And you should be able to do it directly in Java using a post.</p> <p>Files in HTML forms are normally uploaded using a multipart form encoded post body. Something like this:</p> <pre><code>&lt;form enctype="multipart/form-data" action="upload.cgi" method="POST"&gt; &lt;input type="hidden" name="MAX_FILE_SIZE" value="100000" /&gt; Choose a file to upload: &lt;input name="uploadedfile" type="file" /&gt;&lt;br /&gt; &lt;input type="submit" value="Upload File" /&gt; &lt;/form&gt; </code></pre> <p>All you need to do is create the same post request that the form would generate. Here are a few links to get you started with creating multipart post request on Android. </p> <p><a href="https://stackoverflow.com/questions/3360957/how-use-multipart-form-data-upload-picture-image-on-android">How use multipart/form-data upload picture/image on Android</a></p> <p><a href="http://w3mentor.com/learn/java/android-development/android-http-services/example-of-multipart-post-using-android/" rel="nofollow noreferrer">http://w3mentor.com/learn/java/android-development/android-http-services/example-of-multipart-post-using-android/</a></p> <p><a href="http://www.17od.com/2010/02/18/multipart-form-upload-on-android/" rel="nofollow noreferrer">http://www.17od.com/2010/02/18/multipart-form-upload-on-android/</a></p> <p><a href="http://evgenyg.wordpress.com/2010/05/01/uploading-files-multipart-post-apache/" rel="nofollow noreferrer">http://evgenyg.wordpress.com/2010/05/01/uploading-files-multipart-post-apache/</a></p> <p>Here's a debugging tip if you get stuck: You can installed fiddler as a reverse proxy on the CGI server, then you can watch both requests (HTML and Java) as they happen to compare them for differences. <a href="http://www.fiddler2.com/fiddler/help/reverseproxy.asp" rel="nofollow noreferrer">http://www.fiddler2.com/fiddler/help/reverseproxy.asp</a> just remove it for production.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload