Skip to content

NO-JIRA: added removeing query parameters from filename when download…#506

Merged
spirosdi merged 1 commit intodevelopfrom
feature/no-jira-strip-query-from-filename-when-downloading
Feb 26, 2026
Merged

NO-JIRA: added removeing query parameters from filename when download…#506
spirosdi merged 1 commit intodevelopfrom
feature/no-jira-strip-query-from-filename-when-downloading

Conversation

@spirosdi
Copy link
Contributor

What does this do?
It removes any query parameters from fileURL to create the file name when downlading.

Why are we doing this? (with JIRA link)
This is to support importing presigned urls (such as https://spiros-demo-bucket.s3.dualstack.eu-north-1.amazonaws.com/866-200x300%20copy%202.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20260226T094443Z&X-Amz-SignedHeaders=host&X-Amz-Expires=604799&X-Amz-Credential=AKIARVCQFYMS7XR6IIU6%2F20260226%2Feu-north-1%2Fs3%2Faws4_request&X-Amz-Signature=79c91fcd8fdead2a48d2e840ce657c725f1d96d8bb4d8a45bb97ee923478de29) that include a lot of query parameters resulting to a very long url. Eventually leading to (File name too long)  exception.

How should this be tested? Do these changes have associated tests?

  1. Build and deploy the changes
  2. Create a new MH record
  3. In File Information -> Upload select "external media" and in the URL paste the https://spiros-demo-bucket.s3.dualstack.eu-north-1.amazonaws.com/866-200x300%20copy%202.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20260226T094443Z&X-Amz-SignedHeaders=host&X-Amz-Expires=604799&X-Amz-Credential=AKIARVCQFYMS7XR6IIU6%2F20260226%2Feu-north-1%2Fs3%2Faws4_request&X-Amz-Signature=79c91fcd8fdead2a48d2e840ce657c725f1d96d8bb4d8a45bb97ee923478de29
  4. The record should be created normally and the "Name" field should be set to "866-200x300%20copy%202.jpg"

Dependencies for merging? Releasing to production?
No dependencies

Has the application documentation been updated for these changes?
N/A

Did someone actually run this code to verify it works?
@spirosdi ran it locally

Have any new security vulnerabilities been handled?
N/A

@spirosdi spirosdi requested a review from mikejritter February 26, 2026 15:02
Copy link
Contributor

@mikejritter mikejritter left a comment

Choose a reason for hiding this comment

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

Changes look good, I just haven't had a chance to check yet

@spirosdi spirosdi merged commit 9657e74 into develop Feb 26, 2026
3 checks passed
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