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 #947 Add tokens for Original File filename, extension. #948

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

alxp
Copy link

@alxp alxp commented Jun 9, 2023

GitHub Issue: Add tokens to get Original File filename

What does this Pull Request do?

Adds tokens to get info about the original uploaded file to help with derivative file names.

What's new?

Adds three new tokens

  • media-original-file:basename
  • media-original-file:filename
  • media-original-file:extension
  • Does this change add any new dependencies? No
  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)? No
  • Could this change impact execution of existing code? No

How should this be tested?

  1. Go to the Actions page and edit an existing Derivative action
  2. in the field for file name path and name, add one of the new tokens
  3. Upload a new media that will trigger the derivative you edited
  4. The new name should have the token you added in it.

Documentation Status

  • Does this change existing behaviour that's currently documented? No
  • Does this change require new pages or sections of documentation?
  • Who does this need to be documented for? N/A - Tokens are self-documenting

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora/committers

@wgilling wgilling self-requested a review June 14, 2023 17:21
Copy link

@wgilling wgilling left a comment

Choose a reason for hiding this comment

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

It works as needed. The first time I tried this, I did not use the islandoratokens prefix to the token. After updating my token value and running my system action again, the resulting service file was named accordingly.

@wgilling wgilling merged commit b0057d1 into 2.x Jun 15, 2023
@rosiel rosiel deleted the 947-filename-tokens branch June 15, 2023 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants