Skip to content

Do not append an identical file extension#1328

Closed
bourgeoa wants to merge 2 commits into
nodeSolidServer:masterfrom
bourgeoa:master
Closed

Do not append an identical file extension#1328
bourgeoa wants to merge 2 commits into
nodeSolidServer:masterfrom
bourgeoa:master

Conversation

@bourgeoa
Copy link
Copy Markdown
Member

@bourgeoa bourgeoa commented Oct 23, 2019

Fixes #1318

Problem identified in jshttp/mime-types#23

@bourgeoa
Copy link
Copy Markdown
Member Author

bourgeoa commented Oct 23, 2019

@RubenVerborgh
it solves foo.ext$.ext that should be kept as foo.ext
this will help resolve issue #1318 (see comments in - SolidOS/folder-pane#5)

I checked that I have the same test errors with and without the fix.
I also build a tag v5.2.0 pod server with the fix.

Comment thread lib/resource-mapper.js Outdated
return extension && this._types[extension[1].toLowerCase()] || this._defaultContentType
}

// hack to fix file.ext$.ext --> file.ext
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's not do hacks in this class that's actually in good shape 😉

Copy link
Copy Markdown
Contributor

@RubenVerborgh RubenVerborgh left a comment

Choose a reason for hiding this comment

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

Thanks! Kept test; replaced with non-hack.

@RubenVerborgh RubenVerborgh changed the title fix to foo.mp3$.mp3 Do not append an identical file extension Oct 23, 2019
@jaxoncreed
Copy link
Copy Markdown
Contributor

Continued in #1336

@jaxoncreed jaxoncreed closed this Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.mp3 files uploaded with dataBrowser as .mp3$.mp3

3 participants