samvera-labs / fedora-migrate

Gem for migrating content to Fedora4
Other
10 stars 7 forks source link

FedoraMigrate::ContentMover has risky original_name logic #40

Open barmintor opened 9 years ago

barmintor commented 9 years ago

FCR3 DS Labels aren't guaranteed to have any kind of useful ds label. Should this method reproduce the FCR3 logic of deciding how to set the Content-Disposition header, or just be configurable?

awead commented 9 years ago

We probably put the escaping in there to account for some issue with our local Scholarsphere repository. I'm not sure if there are tests, but did you try removing the gsub method? Otherwise, I'm :+1: for something configurable.

dchandekstark commented 8 years ago

+1 @barmintor. This definitely doesn't work for us. In fact we store the original filename using premis:hasOriginalName in an RDF datastream.

awead commented 8 years ago

@dchandekstark I'm not familiar with the Content-Disposition header stuff that @barmintor is talking about, so I'm tempted to just delegate the logic of determining original_name to a class that you can override/extend for your own needs.

dchandekstark commented 8 years ago

@awead That seems reasonable.

dchandekstark commented 8 years ago

Cf. https://github.com/projecthydra/active_fedora/issues/958. Since original_name can't (easily) be changed after creation with current AF code, even more reason to delegate.