Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

Did a complete reinstall of HAP folder and still unable to download a file.

 

There is no errors regarding it in the Event Log, only in the IIS text log

2012-09-12 07:58:32 W3SVC1267602825 10.4.8.4 GET /Extranet1/Download/N/12-10-11.csv - 443

 

I am running is Windows 2003 IIS6. Hap v7 works fine downloading which is quite strange.

Posted

It's happening for all files, for different users and also from end locations.

 

I'm going to try it on a completely different server to see if that makes a difference, it must be an issue somewhere in IIS6 if the download call hasn't changed.

Posted

Got it working... went through the instructions and noticed that the wildcard application map for aspnet_isapi.dll (step 44 of IIS6) hadn't saved in the application pool we were using.

 

Downloading and previewing files happily now.

I have noticed that the live title does not seem to update the "me" section if I login as a different account from my PC in school, but seems fine externally.

Posted

Bah, spoke to soon with it working fine, we found another bug.

 

When in the root of a drive, you can zip a file without any issues.

If you go into a subfolder and try and zip a file it gives us as WCF error (output from firebug below)

 

~/scripts/jquery-1.7.2.min.js line 11

{"Message":"The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter HAP.Web.API:Zip. The InnerException message was 'There was an error deserializing the object of type System.String. Encountered unexpected character 'R'.'.  Please see InnerException for more details.","Detail":null,"FaultType":"NetDispatcherFaultException"}

Posted

Ok, can you try this, change line 143 of ~/myfiles/default.aspx to:

 

var a = '"' + SelectedItems()[index].Data.Path.replace(/\.\.\/download\//gi, "").replace(/\//gi, "\\\\") + '"';

 

Let me know if that fixes it or not. If not another screenshot like above would be great :D

Posted

Hasn't fixed it.

 

The isn't really a difference in the screenshot to make it worth uploading.. only difference was in the source part, the line went from saying

{ "Zip" : "N:\Reports\Reports Charlie.zip", "Paths" : ["N/Reports/Report Charlie.docx"] }

to

{ "Zip" : "N:\Reports\Reports Charlie.zip", "Paths" : ["N\\Reports\\Report Charlie.docx"] }

 

 

I tried copying in the Zip function from version 7 of HAP and it generated the same error. Also tried it with the new code and less \\ so it displayed the path as N\Reports\Report Charlie.docx and it still told me to away and put the kettle on.

Posted

Ok try

 

Line 138

var a = '"' + SelectedItems()[index].Data.Path.replace(/\.\.\/download\//gi, "").replace(/\//gi, "/") + '"';

Line 143

data: '{ "Zip": "' + zipfile.replace(/\//gi, "/") + '", "Paths": [' + a + '] }',

Posted

Amended both lines, but still getting same error message

 

Paths ["NReportsReport Charlie.docx"]

0 "NReportsReport Charlie.docx"

Zip "NReportsReport Charlie.zip"

Source

{ "Zip": "N\Reports\Report Charlie.zip", "Paths": ["N\Reports\Report Charlie.docx"] }

Posted

Tried a fresh copy of the default.aspx, and added the 2 line changes in, just to make sure it wasn't picking up anything else and still erroring, so see the attached image inc source code

haperror.PNG

Posted (edited)

ok try this one

 

Line 138

var a = '"' + SelectedItems()[index].Data.Path.replace(/\.\.\/download\//gi, "").replace(/\\/gi, "/") + '"';

 

 

Line 143

data: '{ "Zip": "' + zipfile.replace(/\\/gi, "/") + '", "Paths": [' + a + '] }',

Edited by nickbro
  • 1 month later...
Posted

We are running 8.1 and if I select multiple files (eg. MS Word .DOC files) and choose "zip", HAP only places the first-selected file in the zip. I made the changes above to default.aspx but it made no change.

 

No error is displayed but as it is "zipping", the HAP dialog box says "undefined 1 of 3 items" (if I choose 3 files and zip them). Only the first-selected file makes it into the zip

 

Thanks

Posted

Ok, fixed.

 

       function Zip(zipfile, index) {
           temp = { Index: index, File: zipfile };
           var a = '"' + SelectedItems()[index].Data.Path.replace(/\.\.\/download\//gi, "").replace(/\\/g, "/") + '"';
           $.ajax({
               type: 'POST',
               url: hap.common.resolveUrl('~/api/MyFiles/Zip') + '?' + window.JSON.stringify(new Date()),
               dataType: 'json',
               data: '{ "Zip": "' + zipfile.replace(/\\/g, "/").replace("//", "/") + '", "Paths": [' + a.replace(/\\/g, "/") + '] }',
               contentType: 'application/json',
               success: function (data) {
                   temp.Index++;
                   $("#progressstatus").dialog("title", hap.common.getLocal("myfiles/zip/zipingitem1") + " " + (temp.Index + 1) + " " + hap.common.getLocal("of") + " " + SelectedItems().length + " " + hap.common.getLocal("items"));
                   $("#progressstatus .progress").progressbar({ value: (temp.Index / SelectedItems().length) * 100 });
                   if (temp.Index < SelectedItems().length) Zip(temp.File, temp.Index);
                   else { temp = null; Load(); setTimeout(function() { $("#progressstatus").dialog("close"); }, 500); }
               },
               error: hap.common.jsonError
           });
       }

 

Line 758:

$("#progressstatus").dialog({ autoOpen: true, modal: true, title: hap.common.getLocal("myfiles/zip/zipingitem1") + " 1 " + hap.common.getLocal("of") + " " + SelectedItems().length + " " + hap.common.getLocal("items") });

 

Line 1153:

$("#progressstatus").dialog({ autoOpen: true, modal: true, title: hap.common.getLocal("myfiles/zip/zipingitem1") + " 1 " + hap.common.getLocal("of") + " " + SelectedItems().length + " " + hap.common.getLocal("items") });

Posted

Yep - worked a treat when zipping multiple files - thanks!

 

After my success, I then went ahead and tried to Zip a folder which contained 9 files. The resultant Zip file was empty. Is zipping folders an intended feature or is it restricted to zipping files?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...