Project

General

Profile

« Previous | Next » 

Revision 10054

Added by Jing Tao over 7 years ago

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.

View differences:

MNResourceHandler.java
1273 1273
	            	extension = ObjectFormatInfo.instance().getExtension(sm.getFormatId().getValue());
1274 1274
	            }
1275 1275
	            filename = id.getValue();
1276
	            if (extension != null) {
1276
	            if (extension != null && filename != null && !filename.endsWith(extension)) {
1277 1277
	            	filename = id.getValue() + "." + extension;
1278 1278
	            }
1279 1279
            }

Also available in: Unified diff