Revision 10054
Added by Jing Tao over 7 years ago
MNResourceHandler.java | ||
---|---|---|
1116 | 1116 |
} |
1117 | 1117 |
String extension = ObjectFormatInfo.instance().getExtension(sm.getFormatId().getValue()); |
1118 | 1118 |
String filename = id.getValue(); |
1119 |
if (extension != null) { |
|
1119 |
if (extension != null && filename != null && !filename.endsWith(extension)) {
|
|
1120 | 1120 |
filename = id.getValue() + extension; |
1121 | 1121 |
} |
1122 | 1122 |
response.setContentType(mimeType); |
Also available in: Unified diff
Add a smart test when we set the file name for the header of "content-deposition":
When the id doesn't end with the file extention, we set the file to be id+extension.