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

10584 - Make file URL formatting consistent #10585

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

bferguso
Copy link
Contributor

@bferguso bferguso commented Feb 7, 2024

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

Fix file URL handling to be consistent in file widget and photo gallery card.
Don't add prefix if it already starts with it

Issues Solved

#10584

Checklist

  • Unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Ticket Background

Further comments

this.getUrl = function(tile){
var url = '';
var name = '';
var val = ko.unwrap(tile.data[this.fileListNodeId]);
if (val && val.length == 1) {
{
url = ko.unwrap(val[0].url) || ko.unwrap(val[0].content);
url = self.cleanUrl(ko.unwrap(val[0].url)) || ko.unwrap(val[0].content);
Copy link
Member

Choose a reason for hiding this comment

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

I guess it makes sense not to bother cleaning the content, if it's expected to be a blob.

Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

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

LGTM

@jacobtylerwalls jacobtylerwalls merged commit 4d340c5 into dev/7.5.x Feb 7, 2024
2 checks passed
@jacobtylerwalls jacobtylerwalls deleted the 10584_fix_file_url_formatting branch February 7, 2024 23:19
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.

File URLs handled differently in file-widget and photo-gallery-card
2 participants