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

Record the mime-type given by fits onto the original file #258

Open
jcoyne opened this issue Sep 1, 2015 · 3 comments
Open

Record the mime-type given by fits onto the original file #258

jcoyne opened this issue Sep 1, 2015 · 3 comments
Labels

Comments

@jcoyne
Copy link
Contributor

jcoyne commented Sep 1, 2015

Occasionally the client will upload a file with mime type: "application/octet-stream" even though FITS correctly determines its mime to be "video/webm". Since CurationConcerns and Hydra-Derivatives depend on the original file mime type, we should update the original file with the mime type found by FITS.

We don't want to have this situation:

irb(main):002:0> gf.mime_type
=> "video/webm"
irb(main):003:0> gf.original_file.mime_type
=> "application/octet-stream"
@tpendragon
Copy link
Contributor

Calling @grosscol

@jcoyne jcoyne self-assigned this Sep 1, 2015
@jcoyne jcoyne added the bug label Sep 1, 2015
@jcoyne
Copy link
Contributor Author

jcoyne commented Sep 1, 2015

Blocked by samvera/active_fedora#890

@jcoyne jcoyne removed their assignment Sep 1, 2015
@grosscol
Copy link
Contributor

grosscol commented Sep 2, 2015

I had not included mime_type as a default property of characterization.

The mime_type update could be done as a consequence of characterization. The characterization will set properties on the generic file. So the generic file could have a property mime_type that has a different response from the mime_type function of the file it contains. I can see how this could be a problem.

Should attempting to update the content file be done as part of the stock characterization? if the generic file's mime_type property was delegated to the original_file, would calling gf.mime_type="application/new-mime" update the original_file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants