Review main Merged

66084[FEATURE] Add download and filename options to FileDumpController

Christian Eßl CR +2 V +2 Hard +650 −4 updated 05/26/21, 20:25

Commit message

The FileDumpController is extended for two new options:

- `dl`: Force download of the file
- `fn`: Use of an alternative filename

To ease the use for extension authors, also a new
view helper is introduced, which allows to create
a link to a file (FAL), while using the new options.

This effectively allows to easily create (download)
links for non-public files within fluid.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Jochen Roth +1
    • Richard Haeser +1
  • Verified V +2 Done
    • Benni Mack +2
    • Jochen Roth +1
    • core-ci +1 CI

Issues 2

Files 9

Review log 3349

Show 1524 earlier messages
  1. Christian Eßl uploaded patch set 1 10/08/20, 14:12

  2. Markus Klein commented on patch set 1 10/08/20, 14:14

    Unresolved

    commit message CGL: imperative present tense. is extended
  3. Markus Klein updated the commit message in patch set 2 10/08/20, 14:14

  4. Markus Klein commented on patch set 2 10/08/20, 14:16

    FileDumpController.php:155

    shouldn't we exclude this from the token validation, so this parameter can be always appended or removed?
  5. Christian Eßl commented on patch set 2 10/08/20, 14:24

    FileDumpController.php:155 Reply

    Wouldn't this just complicate things for the user? The user would then need to make sure to create a token for all query params but "dl" in the url. (see example in changelog file)
  6. TYPO3com voted on patch set 2 V -1 10/08/20, 14:30 Completed build in 15m 36s on Thu, 8 Oct, 02:30 PM Test Summary: 73764 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6369

  7. TYPO3com voted on patch set 1 V -1 10/08/20, 14:30 Completed build in 18m 20s on Thu, 8 Oct, 02:30 PM Test Summary: 73764 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6368

  8. Christian Eßl uploaded patch set 3 10/08/20, 14:38

  9. Christian Eßl updated the commit message in patch set 4 10/08/20, 14:39

  10. Markus Klein commented on patch set 4 10/08/20, 14:55

    FileDumpController.php:155 Reply

    IMO the user(dev) usually doesn't do this on its own. getPublicUrl() of FAL is responsible for this. I see that as the main usecase.
  11. TYPO3com voted on patch set 3 V +1 10/08/20, 14:56 Completed build in 17m 55s on Thu, 8 Oct, 02:56 PM Test Summary: 73764 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6370

  12. TYPO3com voted on patch set 4 V +1 10/08/20, 15:02 Completed build in 20m 54s on Thu, 8 Oct, 03:02 PM Test Summary: 73764 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6371

  13. Oli Bartsch uploaded patch set 5 05/18/21, 12:10

  14. Oli Bartsch commented on patch set 5 05/18/21, 12:19

    FileDumpController.php:155 Reply Unresolved

    Current approach is IMO right. All those parameters have to be included in the token generation. Having a token, generated from parameters, which however does not necessarily include all query parameters, is IMO self-defeating. In case people are using getPublicUrl() and want to add additional parameters to the result, they simply have to recalculate the token manually afterwards. However, to support devs, I think it would be helpful to have a ViewHelper at hand, dealing with the internal stuff, like calculating the token.
  15. core-ci voted on patch set 5 V +1 05/18/21, 12:21 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11618

  16. Oli Bartsch uploaded patch set 6 05/18/21, 20:33

  17. core-ci voted on patch set 6 V +1 05/18/21, 20:43 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11638

  18. Oli Bartsch uploaded patch set 7 05/18/21, 20:45

  19. core-ci voted on patch set 7 V -1 05/18/21, 20:47 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11641

  20. Oli Bartsch uploaded patch set 8 05/18/21, 20:54

  21. core-ci voted on patch set 8 V -1 05/18/21, 20:55 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11643

  22. Oli Bartsch uploaded patch set 9 05/18/21, 22:31

  23. core-ci voted on patch set 9 V -1 05/18/21, 22:43 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11653

  24. Oli Bartsch uploaded patch set 10 05/18/21, 22:49

  1. core-ci voted on patch set 10 V +1 05/18/21, 22:59 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11654

  2. Jochen Roth commented on patch set 10 05/19/21, 11:33

    Just nitpicking ;-)

    Feature-92518-DownloadAndFilenameOptionsAddedToFileDumpController.rst:44

    Should be "file". Maybe change 'file="123"' to 'file="{file}"' coz this could be misleading that this also takes a file UID which did not work for me.

    FileViewHelper.php:55

    Should be "file". Maybe change 'file="123"' to 'file="{file}"' coz this could be misleading that this also takes a file UID which did not work for me.
  3. Jochen Roth uploaded patch set 11 05/19/21, 11:48

  4. Jochen Roth commented on patch set 11 V +1 CR +1 05/19/21, 11:53

    Feature-92518-DownloadAndFilenameOptionsAddedToFileDumpController.rst:44 Reply

    Done

    FileViewHelper.php:55 Reply

    Done
  5. core-ci voted on patch set 11 V +1 05/19/21, 11:59 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11671

  6. André Buchmann commented on patch set 11 05/19/21, 12:11

    FileViewHelper.php:55

    </f:link.page> should be </f:link.file>
  7. Jochen Roth uploaded patch set 12 05/19/21, 12:16

  8. André Buchmann commented on patch set 12 CR +1 05/19/21, 12:24

    FileViewHelper.php:55 Reply

    Done
  9. core-ci voted on patch set 12 V +1 05/19/21, 12:26 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11675

  10. Jochen Roth uploaded patch set 13 05/19/21, 14:23

  11. core-ci voted on patch set 13 V +1 05/19/21, 14:33 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11677

  12. Oli Bartsch uploaded patch set 14 05/19/21, 14:50

  13. Jochen Roth voted on patch set 14 V +1 CR +1 05/19/21, 14:52

  14. core-ci voted on patch set 14 V +1 05/19/21, 15:01 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11680

  15. André Buchmann voted on patch set 14 CR +1 05/19/21, 15:18

  16. Oli Bartsch commented on patch set 14 CR -1 05/19/21, 20:47

    Will add some tests for the new ViewHelper.
  17. Oli Bartsch uploaded patch set 15 05/21/21, 14:58

  18. core-ci voted on patch set 15 V +1 05/21/21, 15:08 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11781

  19. Oli Bartsch uploaded patch set 16 05/21/21, 15:31

  20. core-ci voted on patch set 16 V +1 05/21/21, 15:43 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11783

  21. Benni Mack voted on patch set 16 CR +1 05/25/21, 10:17

  22. Jochen Roth voted on patch set 16 V +1 CR +1 05/25/21, 10:53

  23. Richard Haeser voted on patch set 16 CR +1 05/26/21, 11:50

  24. Benni Mack voted on patch set 16 V +2 CR +2 05/26/21, 20:25

  25. Benni Mack merged patch set 17 05/26/21, 20:25