Note that there are some explanatory texts on larger screens.

plurals
  1. POTitanium HTTPCLIENT can't upload file
    primarykey
    data
    text
    <p>I try to use Brower can upload a file, but if I use Titanium upload, it doesn't work, the brower code is Brower upload file:</p> <pre><code>&lt;form action="upload.php" method="post" enctype="multipart/form-data"&gt; &lt;label for="file"&gt;Filename:&lt;/label&gt; &lt;input type="file" name="file" id="file"&gt;&lt;br&gt; &lt;input type="submit" name="submit" value="Submit"&gt; &lt;/form&gt; </code></pre> <p>Upload.php file:</p> <pre><code>$tmp_file=$_FILES['file']['tmp_name']; $target_file=basename($_FILES['file']['name']); move_uploaded_file($tmp_file, "files/".$target_file); </code></pre> <p>my titanium code is:</p> <pre><code>var webaddress = 'http://' + address.value + ':' + port1.value + '/scanbatch/index.php'; xhr.open('POST',webaddress); xhr.send({files : Titanium.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,'scanbatch.txt')}); </code></pre> <p>it can work but the webservice didn't received anything, just received a header.</p> <p>and by the way , I can send out the short xml through the httpclient ,but if the xml be longer sometime it can't send out, more longer more fail,I mean not always, if the xml longer than 512KB, It always fail.</p> <p>my code is</p> <pre><code>var webaddress = 'http://' + address.value + ':' + port1.value + '/liveho/scanbatch'; xhr.open('POST',webaddress); xhr.send(xmlscript); </code></pre> <p>my onload function is</p> <pre><code>onload : function(e) { alert(this.responseText); }, </code></pre> <p>please help me thank you</p>
    singulars
    1. This table or related slice is empty.
    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. 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