Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-28501

For folder resource, allow files to be opened in the browser rather than being downloaded

XMLWordPrintable

    • Any
    • MOODLE_20_STABLE, MOODLE_24_STABLE, MOODLE_31_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE
    • MDL-28501-master
    • Difficult
    • Hide

      Testing scenario 1: Upgrade

      1. Create/check out a 3.9 site. For example: 

        git checkout v3.9.0

      2. Install the 3.9 site
      3. Login as admin
      4. Create a course with a folder resource
      5. Check out the master branch: 

        git checkout master

      6. Proceed with the upgrade
      7. Check no error is displayed during upgrade
      8. Edit the folder created previously
      9. Ensure "Force download of files" is checked

       

      Testing scenario 2: "Force download of files" behaviour

      Note: Test this scenario on all supported browsers.

      1. Create a new folder resource
      2. Ensure "Force download of files" is checked by default
      3. Upload the attached HTML and image files and save
      4. Try viewing the HTML file
      5. Ensure that it is downloaded to your local system
      6. Try viewing the image
      7. Ensure that it is downloaded to your local system
      8. Edit the folder resource and uncheck "Force download of files"
      9. Try viewing the HTML file again
      10. Check it is shown on screen and no alert with the "BOOM" text is displayed
      11. Try viewing the image again
      12. Check it is shown on screen
      13. Duplicate the folder resource
      14. Edit the new folder
      15. Ensure "Force download of files" is unchecked

       

      Show
      Testing scenario 1: Upgrade Create/check out a 3.9 site. For example:  git checkout v3.9.0 Install the 3.9 site Login as admin Create a course with a folder resource Check out the master branch:  git checkout master Proceed with the upgrade Check no error is displayed during upgrade Edit the folder created previously Ensure "Force download of files" is checked   Testing scenario 2: "Force download of files" behaviour Note : Test this scenario on all supported browsers. Create a new folder resource Ensure "Force download of files" is checked by default Upload the attached HTML and image files and save Try viewing the HTML file Ensure that it is downloaded to your local system Try viewing the image Ensure that it is downloaded to your local system Edit the folder resource and uncheck "Force download of files" Try viewing the HTML file again Check it is shown on screen and no alert with the "BOOM" text is displayed Try viewing the image again Check it is shown on screen Duplicate the folder resource Edit the new folder Ensure "Force download of files" is unchecked  

      When creating a folder resource and uploading html-files in it (htm or html). When viewing the url shows a forcedownload=1 and the browser downloads the html-file in stead of showing it.
      Removing the forcedownload from the url doesn't seem to help.

      Replication instructions:
      1. Create a folder resource
      2. Upload an html file and save
      3. Try viewing the html file
      The browser downloads the file (Chrome) or suggests to save (Firefox)

        1. sample_image.jpg
          sample_image.jpg
          254 kB
        2. test.html
          0.9 kB
        3. TEST 1_Test Passed.png
          TEST 1_Test Passed.png
          155 kB
        4. TEST 2_Test Passed.png
          TEST 2_Test Passed.png
          334 kB

            cfulton Charles Fulton
            koen Koen Roggemans
            Ferran Recio Ferran Recio
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Gladys Basiana Gladys Basiana
            Votes:
            47 Vote for this issue
            Watchers:
            34 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 3 hours, 25 minutes
                1d 3h 25m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.