You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* Returns the filename formatted for inclusion in a Content-Disposition
* header. Includes both a plain version of the name and a UTF-8 version
*
* @since 7.4.8
* @param filename
* The filename to include
* @return A value for inclusion in a Content-Disposition header
*/
public static String getContentDispositionFilename(String filename) {
String encodedFilename = EncodeUtil.rfc5987Encode(filename);
return String.format("filename=\"%s\"; filename*=utf-8''%s",
encodedFilename, encodedFilename);
Observe that you use encodedFilename in both cases instead of using filename in one case and encodedFilename in the other.
The text was updated successfully, but these errors were encountered:
Observe that you use encodedFilename in both cases instead of using filename in one case and encodedFilename in the other.
The text was updated successfully, but these errors were encountered: