Updated the file to just use the fileName from the ReferenceManifest for the downloaded name.

This commit is contained in:
Cyrus 2020-12-02 19:40:50 -05:00
parent a3f5386b21
commit b56fb73801

View File

@ -339,19 +339,7 @@ public class ReferenceManifestPageController
response.sendError(HttpServletResponse.SC_NOT_FOUND);
} else {
StringBuilder fileName = new StringBuilder("filename=\"");
if (referenceManifest.getRimType().equals(ReferenceManifest.BASE_RIM)) {
BaseReferenceManifest bRim = (BaseReferenceManifest) referenceManifest;
fileName.append(bRim.getSwidName());
fileName.append("_[");
fileName.append(referenceManifest.getRimHash());
fileName.append("]");
fileName.append(".swidTag\"");
} else {
// this needs to be updated for support rims
SupportReferenceManifest bRim = (SupportReferenceManifest) referenceManifest;
fileName.append(bRim.getFileName());
}
fileName.append(referenceManifest.getFileName());
// Set filename for download.
response.setHeader("Content-Disposition", "attachment;" + fileName);
response.setContentType("application/octet-stream");