diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Attachment.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Attachment.cshtml index 6b74d22..677a5ad 100644 --- a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Attachment.cshtml +++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Attachment.cshtml @@ -1,10 +1,17 @@ @model CustomAttachment
+ @{ + var fileExtension = Model.ContentType.Split('/').Last().ToLower(); + if (fileExtension == "vnd.openxmlformats-officedocument.spreadsheetml.sheet") + { + fileExtension = "xlsx"; + } + } +
@{ - var fileExtension = Model.ContentType.Split('/').Last().ToLower(); switch (fileExtension) { case "pdf": @@ -40,7 +47,7 @@