Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE-223: Provide media/files at UUIDs additionally to node IDs #268

Merged
merged 2 commits into from
Feb 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions format_strawberryfield.routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ format_strawberryfield.iiifbinary:
format: .+
_entity_access: 'node.view'

# Direct File access for SBF managed files via UUID.
format_strawberryfield.iiifbinary_uuid:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, even if for legacy reasons the controller class is named IiifBinaryController, it would be better to name the route simply format_strawberryfield.binary maybe?

path: '/do/{node}/file/{uuid}/download/{format}'
methods: [GET,HEAD]
defaults:
_controller: '\Drupal\format_strawberryfield\Controller\IiifBinaryController::servefile'
options:
parameters:
node:
type: 'entity:node'
resource_type:
type: 'ado'
requirements:
uuid: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
format: .+
_entity_access: 'node.view'

# Direct File access for owner to Temporary files.
format_strawberryfield.tempiiifbinary:
path: '/domedia/iiif/{uuid}/full/full/0/{format}'
Expand Down