Smallfix IX
This commit is contained in:
@@ -21,13 +21,6 @@ namespace Swarmops.Pages.v5.Support
|
||||
string documentDownloadName = Request.QueryString["DocName"];
|
||||
documentDownloadName = documentDownloadName.Replace("\"", "'");
|
||||
|
||||
if (documentDownloadName.EndsWith(" 2_1"))
|
||||
{
|
||||
// Mystery bug
|
||||
|
||||
documentDownloadName = documentDownloadName.Substring(0, documentDownloadName.Length - 4);
|
||||
}
|
||||
|
||||
Document document = Document.FromIdentity (documentId);
|
||||
|
||||
//Orgid is needed to safely verify permission
|
||||
@@ -214,6 +207,15 @@ namespace Swarmops.Pages.v5.Support
|
||||
}
|
||||
}
|
||||
|
||||
if (documentDownloadName.EndsWith(" 2_1") || documentDownloadName.EndsWith(" 2/1"))
|
||||
{
|
||||
// Mystery bug
|
||||
|
||||
documentDownloadName = documentDownloadName.Substring(0, documentDownloadName.Length - 4);
|
||||
}
|
||||
|
||||
|
||||
|
||||
string legacyMarker = string.Empty;
|
||||
|
||||
if (!File.Exists (Document.StorageRoot + serverFileName))
|
||||
@@ -237,7 +239,7 @@ namespace Swarmops.Pages.v5.Support
|
||||
}
|
||||
}
|
||||
|
||||
Response.ContentType = contentType;
|
||||
Response.AppendHeader("Content-Type", contentType);
|
||||
Response.AppendHeader("Content-Disposition", "attachment; filename=\"" + documentDownloadName + "\"");
|
||||
Response.TransmitFile (Document.StorageRoot + legacyMarker + serverFileName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user