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

Force encoding of IndexedFile original_name to UTF-8 #5046

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

cjcolvar
Copy link
Member

@cjcolvar cjcolvar commented Feb 1, 2023

For some reason when a filename with UTF-8 characters is uploaded as a collection poster image it roundtrips from Fedora as ASCII-8BIT probably due to the fact that it is returned in an HTTP header. Forcing the original_name to UTF-8 in an override feels safe after reviewing Avalon's use of IndexedFiles.

Resolves #5027

For some reason when a filename with UTF-8 characters is uploaded as a collection poster image
it roundtrips from Fedora as ASCII-8BIT probably due to the fact that it is returned in an
HTTP header.  Forcing the original_name to UTF-8 in an override feels safe after reviewing Avalon's
use of IndexedFiles.

Co-authored-by: Mason Ballengee <masaball@iu.edu>
Copy link
Contributor

@masaball masaball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@masaball masaball merged commit 6f59f5d into develop Feb 2, 2023
@masaball masaball deleted the collection_poster_utf8 branch February 2, 2023 14:32
@joncameron joncameron mentioned this pull request Feb 3, 2023
1 task
@joncameron joncameron mentioned this pull request Feb 13, 2023
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants