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

fix for #7184 spaces changed in s3 direct download #7186

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/release-notes/7184-spaces-in-filenames.md
@@ -0,0 +1,7 @@
## Notes for Tool Developers and Integrators

### Filenames

Dataverse Installations using S3 storage will no longer replace spaces in file names with the + character. If your tool or integration has any special handling around this character change, you can remove it.

(review this note if this is in the same release as the fix for #7188)
Expand Up @@ -838,7 +838,8 @@ public String generateTemporaryS3Url() throws IOException {
// Most browsers are happy with just "filename="+URLEncoder.encode(this.getDataFile().getDisplayName(), "UTF-8")
// in the header. But Firefox appears to require that "UTF8" is
// specified explicitly, as below:
responseHeaders.setContentDisposition("attachment; filename*=UTF-8''"+URLEncoder.encode(this.getDataFile().getDisplayName(), "UTF-8"));
responseHeaders.setContentDisposition("attachment; filename*=UTF-8''" + URLEncoder.encode(this.getDataFile().getDisplayName(), "UTF-8")
.replaceAll("\\+", "%20"));
// - without it, download will work, but Firefox will leave the special
// characters in the file name encoded. For example, the file name
// will look like "1976%E2%80%932016.txt" instead of "1976–2016.txt",
Expand Down