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

Add behavior to normalize filename in header #136

Merged

Conversation

denis-rossati
Copy link
Contributor

These changes closes #135

I've added a regex to replace any diacritics to their closest ascii character:

diacritics ascii
á a
fõô bàr foo bar
défìñitlỹ-nôń-ásçìĩ.pñg definitly-non-ascii.png

I'm not sure about the best practices for testing this functionality. Any help is very welcome.

lib/provider.js Outdated Show resolved Hide resolved
@GabrielBarcelos1
Copy link

To test this functionality you can change here:
https://github.com/strapi-community/strapi-provider-upload-google-cloud-storage/blob/master/test/lib/provider.js#L461

Change this test to guarantee your regex is applied

lib/provider.js Outdated Show resolved Hide resolved
@Lith Lith merged commit a6b5937 into strapi-community:master Jul 15, 2022
@denis-rossati denis-rossati deleted the normalize-file-name-header branch November 18, 2022 12:55
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.

Content-Disposition is set with possibly invalid value
4 participants