• hi,
    if I or a user checks the “select all” checkbox to download all files in the folder it returns an error saying “Zip file could not be generated”.
    How can we solve this?
    thanks in advance

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • I’m experiencing the same issue.

    I am having the same issue as well, even after disabling plugins and activating a default theme.

    Thanks for any help you can give ??

    ~ Sean

    Thread Starter hirndrang

    (@hirndrang)

    any news?

    I have managed to fix this on my site.

    I made the following 3 changes:

    To take the error popup away follow step 1
    1. Edit file: public_html/blog/wp-content/plugins/file-away/lib/cls/class.fileaway_management.php

    comment line 866
    // if(empty($_POST[‘loc_nonce’]) || !fileaway_utility::verify_location_nonce($_POST[‘loc_nonce’],$file,array($rootpath,$chosenpath))) continue;

    When you press download, you may not get a file actually downloading. Then perform the next 2 steps
    2. Check the permissions on public_html/blog/wp-content/plugins/file-away/temp
    should be 775 to allow write access to the group

    3. Edit file public_html/blog/wp-content/plugins/file-away/lib/js/management.js

    Update line 300 to add .url to the response as below.

    $(‘<iframe src=”‘+response.url+'” id=”fa-bulkdownload” style=”visibility:hidden;” name=”fa-bulkdownload”>’).appendTo(‘body’);

    — That should be it —

    You should be seeing zip files in the temp directory above. if not check that .zip is enabled in your php extensions (might be available for update from cpanel or plesk). Also if your console shows php Pear, then search for zip and add it.

    — I made one final adjustment which you probably do not need. —
    I did not want a space in the filename so modified the following.

    public_html/blog/wp-content/plugins/file-away/lib/cls/class.fileaway_management.php
    Line 882: – changed the space to an underscore

    $filename = fileaway_utility::stripslashes($prefix).”_”.$time.’.zip’;

    • This reply was modified 4 years, 10 months ago by bentumbler.

    I was experiencing the same problem and the solution proposed by @bentumbler worked for me!

    Thanks @bentumbler for saving me debug time on this one. I wanted to understand the change before adopting it, so I took a closer look and it seems to me that the problem is that the ssfa-bulk-download-engage- function in management.js:232 does not send a loc_nonce in the POST. However, the ssfa-bulk-action-engage- function in management.js:1139 does include a loc_nonce for the download function. So opted to borrow from that for the following change instead:

    Insert new line at management.js:239 of
    var loc_nonce = $('input#location_nonce_'+$uid).val();
    then add comma at end of management.js:287 and insert new line at management.js:288 of
    loc_nonce : loc_nonce

    This solution also worked for me (when paired with the correction to use response.url on what is now line management.js:302).

    This worked for me! Thank you @bentumbler and @travisr. Tagging @thomstark .

    FWIW, @bentumbler , when I copy and pasted your code, the apostrophes in your post were formatted for writing rather than coding — ‘ was changed to ‘ and ’, and ” was changed to “ and ”.

    Thanks @travisr and @bentumbler for your solutions.
    I get zip files downloaded in the temp directory /wp-content/plugins/file-away/temp.
    But how can I get a message box asking my website visitors where to locate the files?

    @dirkgeeroms – check whether you properly implemented the correction to use ‘response.url’ instead of ‘response’.

    @travisr – I did implement that correction as well. Getting a zip file downloaded in the temp directory works fine. The only thing I need now is a message box asking where to locate the zip file…

    Thanks for your reply, @travisr.
    It all works now!

    @dirkgeeroms May I know how you solved your previous problem on how to locate the zip file?

    When you follow the procedure exactly as proposed by @travisr and @bentumbler mentioned above, you’ll get a message box asking you where to locate the zip file.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Zip file could not be generated’ is closed to new replies.