+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 30 of 30
Home Access Plus+ Thread, HAP unable to download Files in Projects:; Amended both lines, but still getting same error message Paths ["NReportsReport Charlie.docx"] 0 "NReportsReport Charlie.docx" Zip "NReportsReport Charlie.zip" Source { ...
  1. #16
    Boredguy's Avatar
    Join Date
    Jun 2011
    Location
    Swindon
    Posts
    600
    Thank Post
    4
    Thanked 133 Times in 124 Posts
    Rep Power
    50
    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"] }

  2. #17
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,561
    Thank Post
    38
    Thanked 507 Times in 437 Posts
    Rep Power
    114
    Well that's odd because it shouldn't be using \ it should be using /

  3. #18
    Boredguy's Avatar
    Join Date
    Jun 2011
    Location
    Swindon
    Posts
    600
    Thank Post
    4
    Thanked 133 Times in 124 Posts
    Rep Power
    50
    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
    HAP unable to download Files-haperror.png

  4. #19
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,561
    Thank Post
    38
    Thanked 507 Times in 437 Posts
    Rep Power
    114
    ok try this one

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

    Line 143
    Code:
    data: '{ "Zip": "' + zipfile.replace(/\\/gi, "/") + '", "Paths": [' + a + '] }',
    Last edited by nickbro; 17th September 2012 at 10:42 AM.

  5. #20
    Boredguy's Avatar
    Join Date
    Jun 2011
    Location
    Swindon
    Posts
    600
    Thank Post
    4
    Thanked 133 Times in 124 Posts
    Rep Power
    50
    Yep that latest modification worked perfectly Nick.

    Zipping now happy in both root and subfolders

  6. #21

    Join Date
    Jul 2012
    Location
    Melbourne
    Posts
    57
    Thank Post
    11
    Thanked 1 Time in 1 Post
    Rep Power
    0
    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

  7. #22
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,561
    Thank Post
    38
    Thanked 507 Times in 437 Posts
    Rep Power
    114
    Ok, fixed.

    Code:
            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:
    Code:
    $("#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:
    Code:
    $("#progressstatus").dialog({ autoOpen: true, modal: true, title: hap.common.getLocal("myfiles/zip/zipingitem1") + " 1 " + hap.common.getLocal("of") + " " + SelectedItems().length + " " + hap.common.getLocal("items") });

  8. #23

    Join Date
    Jul 2012
    Location
    Melbourne
    Posts
    57
    Thank Post
    11
    Thanked 1 Time in 1 Post
    Rep Power
    0
    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?

  9. #24
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,561
    Thank Post
    38
    Thanked 507 Times in 437 Posts
    Rep Power
    114
    It should work, but I don't know, it could be a limitation

  10. #25

    Join Date
    Jul 2012
    Location
    Melbourne
    Posts
    57
    Thank Post
    11
    Thanked 1 Time in 1 Post
    Rep Power
    0
    I can live with it. A student queried it. I can put a disclaimer in the "announcements".

  11. #26

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,161
    Thank Post
    403
    Thanked 623 Times in 569 Posts
    Rep Power
    181
    Is there a list anywhere of all the recent changes to the files, so we can make the fixes to our installs? Or, can you post the correct files with the fixes?

  12. #27
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,561
    Thank Post
    38
    Thanked 507 Times in 437 Posts
    Rep Power
    114
    @Edu-IT the changeset list is what you may be after: https://hap.codeplex.com/SourceControl/list/changesets

  13. #28

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,161
    Thank Post
    403
    Thanked 623 Times in 569 Posts
    Rep Power
    181

    HAP unable to download Files

    So can you just download a changeset and drop those files in??

  14. #29
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,561
    Thank Post
    38
    Thanked 507 Times in 437 Posts
    Rep Power
    114
    If it's the my files stuff, this post has the latest version: [HAP+][v8.1] - Feature Requests

  15. #30

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,161
    Thank Post
    403
    Thanked 623 Times in 569 Posts
    Rep Power
    181
    Quote Originally Posted by nickbro View Post
    If it's the my files stuff, this post has the latest version: [HAP+][v8.1] - Feature Requests
    Spot on, thanks!

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Unable to rename file in version 8
    By peterdwyer in forum Home Access Plus+
    Replies: 8
    Last Post: 1st September 2012, 06:42 PM
  2. Replies: 22
    Last Post: 19th October 2011, 01:59 PM
  3. WSUS unable to download updates
    By Chuckster in forum Windows Server 2000/2003
    Replies: 5
    Last Post: 3rd May 2009, 10:24 PM
  4. [MS Office - 2003] Outlook unable to send files
    By nephilim in forum Office Software
    Replies: 6
    Last Post: 12th December 2008, 11:55 AM
  5. Replies: 4
    Last Post: 9th June 2008, 01:52 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •