Uploaded image for project: 'Airavata'
  1. Airavata
  2. AIRAVATA-3458

Don't preview large files in user storage browser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Django Portal
    • None

    Description

      The user storage browser automatically tries to download files that are the right type to preview but doesn't check their size first. So with a large file, it attempts to load the entire file into the codemirror editor and this causes the browser to hang.

      The file size should be checked first and no preview/edit offered for large files.

      Somewhat arbitrarily I chose a large file cutoff of 1MB. We can easily adjust as necessary: https://github.com/apache/airavata-django-portal/blob/develop/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/storage-edit/UserStorageTextEditViewer.vue#L36

      TODO

      • [x] add a get_data_product_metadata function to user_storage, similar to get_file_metadata but taking a data_product or data_product_uri
      • [x] add a check in UserStorageTextEditViewer.vue to load the filesize first and display a message if the file is too large, otherwise load the file into the editor like it is currently doing
      • [x] add gzip compression to file download ( in api and in SDK)
      • [x] add owner_username override to get_data_product_metadata
      • [x] Want to revisit how the UI handles disabling preview for large files.

      Attachments

        Issue Links

          Activity

            People

              marcuschristie Marcus Christie
              marcuschristie Marcus Christie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: