Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-41272

Improve code that allows the download of files and folders from resources/dropbox into a zip file on the fly

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.5
    • Fix Version/s: 20.0 [Tentative]
    • Component/s: Content, Drop box
    • Labels:
      None
    • Test Plan:
      Hide

      Make sure that the properties in my first comment below are set on the server - on the nightly2 servers list click the appropriate link for the server for the properties file and check that the two properties (starting content.zip.download) are not commented out and are the sizes mentioned in the comments.

      Go to the resources tool for a site. Upload a file that is over 3KB and make sure you have other files that add up to over 5KB where no individual file is over 3KB.

      Tick the file that is over 3KB and click Download Zip. You should get a warning message with the filename saying it exceeds the file size allowed.

      Tick the files that are over 5KB in total and click download zip. Check that you get a warning message saying that the files exceed the maximum allowed size for the zip.

      Click a folder within the site and click download zip. Download the zip, extract it and check that the folder structure is the same as that in Resources.

      Click a number of files and click download zip. Download the zip, extract it and check that the folder structure is the same as that in Resources.

      Go to the Drop Box tool for the site. Add a file to a couple of the users' dropboxes. Click next to the users' names and the 'Download Zip'. Check that the zip has the word 'DropBox' at the end of the name and that the content of the zip is correct.

      Show
      Make sure that the properties in my first comment below are set on the server - on the nightly2 servers list click the appropriate link for the server for the properties file and check that the two properties (starting content.zip.download) are not commented out and are the sizes mentioned in the comments. Go to the resources tool for a site. Upload a file that is over 3KB and make sure you have other files that add up to over 5KB where no individual file is over 3KB. Tick the file that is over 3KB and click Download Zip. You should get a warning message with the filename saying it exceeds the file size allowed. Tick the files that are over 5KB in total and click download zip. Check that you get a warning message saying that the files exceed the maximum allowed size for the zip. Click a folder within the site and click download zip. Download the zip, extract it and check that the folder structure is the same as that in Resources. Click a number of files and click download zip. Download the zip, extract it and check that the folder structure is the same as that in Resources. Go to the Drop Box tool for the site. Add a file to a couple of the users' dropboxes. Click next to the users' names and the 'Download Zip'. Check that the zip has the word 'DropBox' at the end of the name and that the content of the zip is correct.

      Description

      The java code and velocity template code for this additional feature need some improvements in order to bring them in line with other Sakai code.

      Note that these changes have meant that the file structure within the zip file that is downloaded no longer has the site name at the top level. So the old code (Daniel Echeverria's code) was like this:
      Zip filename: siteName.zip
      Top folder in zip: siteName
      Second folder in zip: aFolder

      My code results in this structure:
      Zip filename: siteName.zip
      Top folder in zip: aFolder
      Second folder in zip: anotherSubFolder

      Replicating the same structure would meaning changing current code that is used for the Actions menu 'Compress to ZIP archive'.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rebeccam Rebecca Miller
                  Reporter:
                  rebeccam Rebecca Miller
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code