[jQuery] File uploading with the jQuery form plugin
<html>
<body>
Hello folks,
I'm having difficulty getting a successful file upload working with the
form plugin for which I'd appreciate assistance.
My backend is ASP - I can "catch" the posted elements using
request.form(..), but not via the objUpload object created by my upload
program (Persits.Upload) as I would expect. I know the latter is
"working" as I have tested to see if the object is created (it
is) and the server side code works fine in other applications where I'm
submitting the form back to the originating page.
When I look in the headers, I find that the content type is:
<tt>Content-Type application/x-www-form-urlencoded
</tt>Is that what it should be reporting?
My uploads form is loaded from an ajax call
(<font face="Courier New, Courier">getUploadInfo())</font>...
<pre><div id="ulf"><form
action="scripts/ajax_ramosus_editor.asp?id=37"
method="post" id="upload_form"
enctype="multipart/form-data">
<input size="80" name="file1"
id="file1" type="file">
<input class="" size="80" name="file2"
id="file2" type="file">
<input value="Submit" class="sbtn"
type="submit">
</form></div>
</pre><font face="Courier New, Courier">function getUploadInfo() {
$.ajax({
type: 'GET',
url:
"scripts/ajax_ramosus_editor.asp?id=36&q=" + new
Date().getTime(),
dataType:
"html",
success: function(html){
$("#ulf").html(html).show();
var
options = {dataType: 'html',before: showUploadRequest, after:
showUploadResponse};
$('#upload_form').submit(function() {$(this).ajaxSubmit(options);return
false;});
}
});
};
</font>Is there anything here that I'm overlooking?
Thanks,
Bruce
</body>
</html>