Merge pull request #7400 from riadvice/fix-filename-download-encoding
Fix downloaded file encoding.
This commit is contained in:
commit
0522b2ce87
@ -20,6 +20,9 @@ package org.bigbluebutton.web.controllers
|
|||||||
|
|
||||||
import grails.converters.*
|
import grails.converters.*
|
||||||
import org.bigbluebutton.api.ParamsProcessorUtil;
|
import org.bigbluebutton.api.ParamsProcessorUtil;
|
||||||
|
|
||||||
|
import java.nio.charset.StandardCharsets
|
||||||
|
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
import org.bigbluebutton.web.services.PresentationService
|
import org.bigbluebutton.web.services.PresentationService
|
||||||
import org.bigbluebutton.presentation.UploadedPresentation
|
import org.bigbluebutton.presentation.UploadedPresentation
|
||||||
@ -296,7 +299,7 @@ class PresentationController {
|
|||||||
|
|
||||||
def bytes = pres.readBytes()
|
def bytes = pres.readBytes()
|
||||||
def responseName = pres.getName();
|
def responseName = pres.getName();
|
||||||
response.addHeader("content-disposition", "filename=$responseName")
|
response.addHeader("content-disposition", "filename=" + URLEncoder.encode(responseName, StandardCharsets.UTF_8.name()))
|
||||||
response.addHeader("Cache-Control", "no-cache")
|
response.addHeader("Cache-Control", "no-cache")
|
||||||
response.outputStream << bytes;
|
response.outputStream << bytes;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user