From 0f4c1fcaeaa499a20eaaae3295e45c03edacfcb0 Mon Sep 17 00:00:00 2001 From: AshGDS <8880610+AshGDS@users.noreply.github.com> Date: Tue, 5 Dec 2023 16:49:55 +0000 Subject: [PATCH] Add ZIP file support to attachment component So that it's the same as it was previously: https://webarchive.nationalarchives.gov.uk/ukgwa/20230713202658/https://www.gov.uk/government/publications/vehicle-market-surveillance-unit-programme-results-2020 --- CHANGELOG.md | 1 + lib/govuk_publishing_components/presenters/attachment_helper.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7c957aaa1..184004d9bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ## Unreleased * Standardise search term formatting across GA4 trackers ([PR #3746](https://github.com/alphagov/govuk_publishing_components/pull/3746)) +* Add ZIP file support to attachment component ([PR #3751](https://github.com/alphagov/govuk_publishing_components/pull/3751)) ## 36.0.2 diff --git a/lib/govuk_publishing_components/presenters/attachment_helper.rb b/lib/govuk_publishing_components/presenters/attachment_helper.rb index 6fe6576b39..ab5e05e270 100644 --- a/lib/govuk_publishing_components/presenters/attachment_helper.rb +++ b/lib/govuk_publishing_components/presenters/attachment_helper.rb @@ -105,6 +105,7 @@ class SupportedContentType { content_type: "application/vnd.openxmlformats-officedocument.presentationml.presentation", name: "MS PowerPoint Presentation" }.freeze, # pptx { content_type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", name: "MS Excel Spreadsheet", spreadsheet: true }.freeze, # xlsx { content_type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", name: "MS Word Document", document: true }.freeze, # docx + { content_type: "application/zip", abbr: "ZIP", name: "Zip archive" }.freeze, { content_type: "application/xml", abbr: "XML", name: "XML Document" }.freeze, { content_type: "image/gif", abbr: "GIF", name: "Graphics Interchange Format" }.freeze, { content_type: "image/jpeg", name: "JPEG" }.freeze,