Forum

HomeHomeCoreCoreSamples and oth...Samples and oth...Jquery Uploader - Multiple file, no postback!!Jquery Uploader - Multiple file, no postback!!
Previous
 
Next
New Post
11/20/2011 12:18 PM
 

I was able to implement Uploadify with OWS.  This supports multiple file upload  (i have that turned off by default) and requires no post back.  Unfortunately,  this does require a handler.  However, in the example I have provided an example on how to pass back any variables you need to from OWS.  Look at the OnComplete (in the configuration) you can fire off ows.Fetch to add the file name to the database or whatever you need.


Please consult the Uploadify documentation for additional configuration options.


I would love to see what can be built upon this!  I would also love to see if we could bypass the handler somehow, hint hint!


Since for some reason I can't upload my config files, I have provided download link below..


Install instructions:

Extract the zip to your site root. And import the configuration file.

Download Uploadify for OWS here.

New Post
11/20/2011 1:28 PM
 

If you want to use the "folder" option in script, use this code below in your Upload.ashx file.

string targetDirectory = Path.Combine(context.Request.PhysicalApplicationPath, context.Request["folder"].Replace("/",""));

string targetFilePath = Path.Combine(targetDirectory, file.Filename);
file.SaveAs(targetFilePath);

New Post
4/17/2012 11:13 AM
 
Thanks jebrel!! This pointed me in the right direction on an urgent project. For anyone else using this, uploadify is a great jquery plugin. You can ignore (delete) the .php files entirely and just use the .ashx file jebrel wrote as a great starting point for your own backend handler script.
New Post
7/27/2012 7:52 AM
 

Hi wssdaadmin, hi jebrel,

 

this is a crossposting from http://www.openwebstudio.com/Community/Forums/tabid/55/forumid/1/threadid/22956/scope/posts/Default.aspx but i think, here is the better place for my question.


yesterday i tried to implement uploadify, but no luck.
I have also read the thread from jebrel http://www.openwebstudio.com/Community/Forums/tabid/55/forumid/2/postid/26699/scope/posts/Default.aspx

In this solution, i have some question:
1. where to pu the Upload.ashx, in SystemRoot or portalRoot?
2.   file.SaveAs("C:\\" + param1 + file.FileName); do i have to change the path at this point to C:\inetpub\wwwroot\DNN\Portals\1\uploads ?
3. This is the script from jebrel: (my changes included)
('#file_upload').uploadify({
        'uploader':'/portals/1/uploadify/uploadify.swf',
        'script':'/portals/1/Upload.ashx',
        'cancelImg':'/portals/1/uploadify/cancel.png',
        'scriptData': { 'param1': param1},
        'fileDesc': 'PDF Files',
        'fileExt': '*.pdf',
        'sizeLimit': '5000000',
        'buttonText': 'Upload PDF',
        'folder': '/portals/1/uploads/',
        'auto': true,
        'onComplete': function(event,queueID, fileObj, response, data) {
        if (response=="1") alert("Success");
        else alert("Failed")
        },
        'multi': true

4. I´am right with my changes?
5. what about the variable var param1 = 100 ? What does this mean?

I thought about changing from
'script':'/portals/1/Upload.ashx', to something like
'script':'$.post("[Request.RawUrl,System]?action=upload&Itemid="(1,2,3,4...)',    

Any thougths are welcome.
Maybe you can bring some light into the dark, perhaps its not working for me. i alwas get the error message and no file is written to the disk.

Otherwise i´am also interested in the inline solution for file upload without full postback.

thanks, Richard
New Post
10/11/2012 4:07 PM
 

Thanks for this, I'm getting an error that simply reads Http Error.

The upload display reaches 100% and then these errors pop up


   

Can someone tell me what/where I need to look to find out what this error might be?  I've looked in the site log and this is the last line:


2012-10-11 21:52:32 W3SVC923116445 192.168.1.2 POST /Upload3.ashx - 80 - 192.168.1.7 Mozilla/5.0+(Windows+NT+6.0;+WOW64)+AppleWebKit/537.4+(KHTML,+like+Gecko)+Chrome/22.0.1229.94+Safari/537.4 500 0 0


So it looks like a '500' error, I have CustomErrors Off, and I get the same error whether I do it locally on the server or not, and putting in the UploadError option doesn't make any difference, possibly because it's an http error rather than an uploadify one.


Many thanks


Barry

Previous
 
Next
HomeHomeCoreCoreSamples and oth...Samples and oth...Jquery Uploader - Multiple file, no postback!!Jquery Uploader - Multiple file, no postback!!


 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share