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

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

Closed
bourgeoa opened this issue Oct 15, 2019 · 7 comments · Fixed by #1338
Closed

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

bourgeoa opened this issue Oct 15, 2019 · 7 comments · Fixed by #1338
Assignees
Labels
test-case Issues that will be revisited to be coded up as a surface test case.

Comments

@bourgeoa
Copy link
Member

see SolidOS/folder-pane#5 from @timbl

resource-mapper is creating the file foo.mp3 as foo.mp3$.mp3
contentType of .mp3 is audio/mpeg but iana extension for audio/mpeg is mpga.

So the check is a false wrong match and resource-mapper is creating foo.mp3$.mp3
I think it should be foo.mp3

It can be generalized so that resource-mapper.mapUrlToFile returns foo.ext and not foo.ext$.ext

@jaxoncreed
Copy link
Contributor

This is a pretty bad problem. Would you like to make a pull request with a fix? Otherwise, I'll get around to fixing this.

@jaxoncreed jaxoncreed self-assigned this Oct 16, 2019
@bourgeoa
Copy link
Member Author

bourgeoa commented Oct 16, 2019 via email

@kjetilk kjetilk added the test-case Issues that will be revisited to be coded up as a surface test case. label Oct 17, 2019
@jaxoncreed
Copy link
Contributor

@bourgeoa I cannot reproduce this. Could you send me the CURL of the request and the configuration of your NSS

@bourgeoa
Copy link
Member Author

bourgeoa commented Oct 18, 2019

I am using NSSv5.2.0 on a docker installation https://alain.bourgeoa.ga/public/music/
there are 3 files created using the + button from the databrowser.
I join a copy of the files in the filesystem. As you can see there is a $.mp3 extension to the mp3 file

2019-10-18 (2)

I don't use curl. Can you send me an example.

I am finalizing a PR fix. I must first build and test it on my server
it takes in consideration that the file extension as to be one of the allowed extensions for the contentType and not only the first one as it is actually done.

@Ryuno-Ki
Copy link

You can use the context menu in Network Monitor to copy a request as cURL.

@jaxoncreed
Copy link
Contributor

If you're already working on a fix, then that's fine. But for future reference, as @Ryuno-Ki pointed out, you can usually right-click on the request and copy it as CURL

image

@bourgeoa
Copy link
Member Author

see PR #1328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-case Issues that will be revisited to be coded up as a surface test case.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants