curationexperts-deprecated / tenejo-v1

Tenejo is a general purpose Digital Repository/Asset Management System.
Other
3 stars 2 forks source link

Application should not modify my filename #111

Closed mark-dce closed 5 years ago

mark-dce commented 5 years ago

ISSUE When I upload a manifest file with a name like Sample - Connell - minimal.csv the system displays it as Sample_-_Connell_-_minimal.csv.

Is it really necessary for the system to replace spaces with underscores, or is this just a situation where that's easier from a technical perspective, but not strictly required?

If we don't have to modify the filename in any way and have libraries that can supply the necessary escaping when required, it would be more user-friendly to deal with this in the code than to change the filename (and display the changes).

ACCEPTANCE

ALTERNATIVE ACCETPANCE

ATLERNATIVE ALTERNATIVE

little9 commented 5 years ago

Carrierwave (the Gem that Tenejo & Hyrax use for file uploading) is doing this escaping: https://github.com/carrierwaveuploader/carrierwave#filenames-and-unicode-chars

little9 commented 5 years ago

If you don't replace the spaces with underscores by adding spaces to the whitelist the file name is URL encoded in other parts of the Carrierwave code.

bess commented 5 years ago

I really don't want to try to mess with what Carrierwave is doing. That's a solid well tested library that I want to rely on as "boring technology". If we really think it's a problem that the files are getting re-named, we should tell people they can't use spaces.

val99erie commented 5 years ago

I agree with Bess. We shouldn't mess with how carrierwave is storing files. However, we do have the option to display the filenames in the UI differently from how they are stored on the file system. It would be additional work, of course. Personally, I would prefer to tell users that they can't use spaces in file names (certainly for the MVP release).

mark-dce commented 5 years ago

@little9 - I like what you came up with! Like I said the main issue was that something was being changed and we weren't telling the user that it would happen or why. I really like this as the simplest solution :)

111 - csv filename user notification