Mayank
Mayank

Reputation: 5728

uploadify: IO error

I've following code for multiple image upload:

<SCRIPT>

function render_uploadify()
{
    $("#body_partition_middle").html('<DIV class = "photo_upload_w"><DIV class = "photo_upload" id = "photo_upload"></DIV><BR><INPUT id = "photo_upload_input" name = "photo_upload_input" type = "file"/><a href="javascript:$(\'#photo_upload_input\').uploadifyUpload();">Upload Files</a></DIV>');

    $("#photo_upload_input").uploadify({
            "uploader"  : "/knock/js/uploadify/uploadify.swf",
            "script"    : "/knock/dummy/upload.html",
            "cancelImg" : "/knock/js/uploadify/cancel.png",
            "folder"    : "/knock/js/uploads",
            "multi"     : true,
            "queueID"   : "photo_upload",
            "auto"      : true
        });
}

</SCRIPT>

The above function is being called like:

<A href = "javascript:render_uploadify()">Upload</A>

Well, the GUI is rendered buy uploadify plugin but when I try to upload files, it ends up into IO error.

The request that I'm receiving at the backend is like:

POST /knock/dummy/upload.html HTTP/1.1
Host: 192.168.1.2:8888
User-Agent: Shockwave Flash
Connection: Keep-Alive
Cache-Control: no-cache
Accept: text/*
Content-Length: 2492
Content-Type: multipart/form-data; boundary=----------------------------368d2437ab8d

But there is no HTTP request message body.

Could somebody please tell me what I might be doing wrong here!!

Upvotes: 7

Views: 15205

Answers (4)

Diego
Diego

Reputation: 21

Your IIS is limiting the asp request to the default size which is lower than the file you are uploading, I bet it will work for 10k files right now. Check the following link and that will fix it:

http://arulmurugant.blogspot.com/2008/04/request-object-error-asp-0104-80004005.html

Upvotes: 2

ice cream
ice cream

Reputation: 2470

Which version of Uploadify are you using?

I think it would be worth trying your DOM manipulation on ready() rather than onclick():

<div id="body_partition_middle">
    <DIV class="photo_upload_w" id="photo_upload_w" style="display: none;">
        <DIV class="photo_upload" id="photo_upload"></DIV><BR>
        <INPUT id="photo_upload_input" name="photo_upload_input" type="file"/>
    </DIV>
</div>

<script type="text/javascript">//<![CDATA[
    $(function() {
        $("#photo_upload_input").uploadify({
            "uploader"  : "/knock/js/uploadify/uploadify.swf",
            "script"    : "/knock/dummy/upload.html",
            "cancelImg" : "/knock/js/uploadify/cancel.png",
            "folder"    : "/knock/js/uploads",
            "multi"     : true,
            "queueID"   : "photo_upload",
            "auto"      : true
        });
    });
//]]></script>

<A href="#" onclick="$('#photo_upload_w').show(); return false;">Upload</A>

Also with "auto":true you don't need the submit link.

Upvotes: 0

keyle
keyle

Reputation: 2837

Are you sure you have the rights to write in the destination folder? The upload folder should be 777 or "all users can read/write". Actually Write is the only really required right.

Upvotes: 1

LeeR
LeeR

Reputation: 1636

Does it "look" like the image being uploaded? By this I mean does the progress bar count up to 100%, if you are using the progress bar.

Is the folder that you are trying to write to, have write permissions?

Upvotes: 0

Related Questions