Pdf viewer download button save file as real title of pdf

Bug #1732810 reported by Robert Lyon on 2017-11-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Wishlist
Robert Lyon

Bug Description

Currently defaults to 'document.pdf' because we don't pass the real title to the download button

Robert Lyon (robertl-9) on 2017-11-17
Changed in mahara:
status: New → In Progress
importance: Undecided → Medium
milestone: none → 18.04.0
assignee: nobody → Robert Lyon (robertl-9)
Changed in mahara:
importance: Medium → Wishlist
Niranjan (niranjan528) wrote :

Environment to be tested: Master
Browser to be tested: Any browser

Precondition:

1. Normal user ‘User one’ should exist.
2. A Page ‘Page 01’ should exist.
3. A PDF file ‘Test.pdf’ should exist in Main menu > Content > Files.
4. A PDF file ‘Test1.pdf’ should exist on your computer.
Steps to reproduce:

1. Log in as ‘User one’.
2. Navigate to Main menu > Portfolio > Pages and collections.
3. Click the 'More' icon and then the 'Edit' button for ‘Page 01’.
4. Expand the ‘Media’ panel and click the ‘PDF’ button.
5. Click the ‘Add’ button.
6. Expand the ‘File’ panel.
7. Select the ‘Test.pdf’ file and click the ‘Save’ button.
8. Move the scroll bar to the right in the PDF block, so that we can see the ‘Toolbar advanced menu’.
9. Click the ‘Toolbar advanced menu’ button.
10. Click the ‘Download’ button.

Expected result: The document should be downloaded as ‘Test.pdf’

11. Click the 'PDF' button from the 'Media' panel.
12. Click the ‘Add’ button.
13. Expand the ‘File’ panel.
14. Click the 'Browse' button and select 'Test1.pdf' from the computer.
15. Click the ‘Save’ button.
16. Move the scroll bar to the right in the PDF block, so that we can see the ‘Toolbar advanced menu’.
17. Click the ‘Toolbar advanced menu’ button.
18. Click the ‘Download’ button.

Expected result: The document should be downloaded as ‘Test1.pdf’.

Reviewed: https://reviews.mahara.org/8287
Committed: https://git.mahara.org/mahara/mahara/commit/dcc794ec350251c0ed3ad75cb3a74a713d99b1d6
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit dcc794ec350251c0ed3ad75cb3a74a713d99b1d6
Author: Robert Lyon <email address hidden>
Date: Fri Nov 17 14:23:33 2017 +1300

Bug 1732810: Pass file's title to pdfjs download button

So saves as file name rather than 'document.pdf'
Also make en-GB the default english as 'en' is not an lang file for
the pdfjs

behatnotneeded

Change-Id: I320a141ce6c0a0734b9c0e21d6b933f5d99c238f
Signed-off-by: Robert Lyon <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
tags: added: nominatedfeature
Robert Lyon (robertl-9) on 2018-04-05
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers