Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

ASP.NET Uploadify Port
  • I am trying to convert Uploadify script to a reusable ASP.NET control, so it can be used as a simple drag and drop control and It can used without any scripting knowledge.

    But I am having some issues:
    1) There is WebResources topic in ASP.NET where we pack everything inside a dll and get it from there, I tried to use uploader.swf file as a Webresource, everything works fine and I can see the flash button but if I click on it & select files to upload there is no queue created for files but I am able to upload file using fileUploadStart() Function.

    But if i used uploader.swf from a directory everything works fine. why this happening?

    2) folder setting -The path to the folder you would like to save the files to. Do not end the path with a ‘/’. where this setting is used because i can upload files without it.

    3) function calls are not working on any event like onAllComplete

    here is the html code generated





    <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
    <html xmlns=\"http://www.w3.org/1999/xhtml\">
    <head><title>
    Untitled Page
    </title><link href=\"/WebResource.axd?d=CMJDnIHBTLyO1xWIGhY88_iSgzLZ9D5xwGUDpAVOWX-hQ-6UB-OJKdKrQ7SgjZ2Eu_7lbohlKcX7-yD7R3E5Nw2&amp;amp;t=633725022512603750\" rel=\"stylesheet\" type=\"text/css\" /></head>
    <body>
    <form method=\"post\" action=\"Default.aspx\" id=\"form1\" enctype=\"multipart/form-data\">
    <div>
    <input type=\"hidden\" name=\"__VIEWSTATE\" id=\"__VIEWSTATE\" value=\"/wEPDwUKMTk3ODI1NTI1NA9kFgICAw8WAh4HZW5jdHlwZQUTbXVsdGlwYXJ0L2Zvcm0tZGF0YWRkempjMH2sHshmbBJ260Zj7/++dYI=\" />
    </div>


    <script src=\"/WebResource.axd?d=CMJDnIHBTLyO1xWIGhY88_iSgzLZ9D5xwGUDpAVOWX9-TVXx81Oh5qLghGr5NUSU-eBSJXvfKdHMoZxXyVvUmw2&amp;amp;t=633725022512603750\" type=\"text/javascript\"></script>
    <script src=\"/WebResource.axd?d=CMJDnIHBTLyO1xWIGhY88_iSgzLZ9D5xwGUDpAVOWX9-TVXx81Oh5qLghGr5NUSUeWDZbEWIea2uM0mQM1BbFQ2&amp;amp;t=633725022512603750\" type=\"text/javascript\"></script>
    <div>
    &amp;nbsp;&amp;nbsp;&amp;nbsp;

    &amp;nbsp;&amp;nbsp;

    <br />
    <br />
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
    <div id=\"Uploadify1\" style=\"background-color:#FFFFFF;border:1px solid #E5E5E5;margin-bottom:20px;padding:20px;\">
    <input name=\"Uploadify1$FileInput\" type=\"file\" id=\"Uploadify1_FileInput\" /><br /><a href=\"javascript:$('#Uploadify1_FileInput').fileUploadStart();\">Upload Files</a> | <a href=\"javascript:$('#Uploadify1_FileInput').fileUploadClearQueue();\">Clear Queue</a>
    </div>
    <br />
    <br />
    <script type=\"text/javascript\">
    function Uploadify1_OnAllComplete(e, data) {
    alert('hi');
    }
    </script>
    </div>

    <script type=\"text/javascript\">/* <![CDATA[ */
    $(document).ready(function() {
    $('#Uploadify1_FileInput').fileUpload({
    uploader: '/uploader.swf',
    scriptAccess: 'always',
    wmode: 'opaque',
    multi: true,
    auto: false,
    fileExt: '*.jpg;*.jpeg;*.gif;*.png',
    fileDesc: 'Image Files',
    onError: function() { alert('hi'); },
    onAllComplete: function(event, queueID, fileObj, response, data) { alert('hi');},
    buttonText: 'Select Files...',
    script: 'Handler1.ashx',
    cancelImg: '/WebResource.axd?d=CMJDnIHBTLyO1xWIGhY88_iSgzLZ9D5xwGUDpAVOWX-X0-Nb2jsPtzFoOg6lLUPBgJ74Q7eB84cV3tt9S-KgsA2&amp;t=633725022512603750',
    displayData: 'speed',
    width: 110,
    height: 30
    });
    });

    /* ]]> */</script></form>
    </body>
    </html>


    I am using latest version of Jquery & uploadify plugin.

    Any suggestions ?