-
Notifications
You must be signed in to change notification settings - Fork 4
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
Dragged mp3 file gets renamed as "foo.mp3_.mp3" #5
Comments
That file was made by dragging a file from the desktop onto the green plus of the folder. (Free music for testing from the Free Music Archive https://freemusicarchive.org/music/Les_Hayden/Proverbs_1720 ) |
hmm
|
I don't know what is your NSS version. I tried to drag a .mp3 file to a pod with NSSv5.2.0 and the file on the filesystem appears to be :
(I don't know if there is an other case than |
NSS issue is separate (but same cause) and fixed in nodeSolidServer/node-solid-server#1328 |
https://github.com/solid/solid-ui/pull/147 solves the point suppressing double check in solid-ui and NSS |
@bourgeoa I've tested the latest version of dev on node-solid-server (which has nodeSolidServer/node-solid-server#1336 merged into it), and it seems to me that we don't need a fix for solid-ui. (Your fix being https://github.com/solid/solid-ui/pull/147.) @timbl I suspect this to be the case for your PR as well (https://github.com/solid/solid-ui/pull/144). With the fix in NSS, when I drag and drop a mp3 file onto the green plus icon, the resulting filename for Am I missing something, or could we close these two PRs? |
I think you are missing something. I am not sure why yours works without #144. The problem is for any mime type extension where mapping is not symmetrical, the old code will mistakenly think that the extension is wrong when in fact it is right. If your case works, then do you still have at the console these results?
The extension must be allowed if EITHER it is the right extsnion for the mime type OR th emime type is the right one for the extension. Maybe when there > 1 extsnsions, then the module gives randomly each one... so it will fail randomly? Not sure why yours worked., Not a function of NSS at all. |
@timbl It depends. In NSS 4.x, a file that was POST/PUT to the server would need to have the correct extension, or NSS would think it was Turtle. In NSS 5.x, only the content type matters. So why is Mashlib adding this extension? |
https://github.com/solid/solid-ui/pull/147 solves the point suppressing double check in solid-ui and NSS |
In NSS 5.x the content is reflected in the
|
Eg https://timbl.com/timbl/Public/Test/Music/Les%20Hayden/Proverbs/Les_Hayden_-_01_-_Gift_Horse.mp3_.mp3
The algorithm should notice that the mime type of the file is fine as it .. and not add another extension.
The text was updated successfully, but these errors were encountered: