Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add attachment_data_id to file attachments
This needs to follow on from alphagov/publishing-api#2994 As described there, the lack of attachment_data_id in the data for file asset attachments in content store makes it hard to request the attachments on the server side. Instead, we have to redirect users to the assets, which has led to ugly workarounds like CSV previews being rendered by frontend but served on assets.publishing.service.gov.uk. Adding attachment_data_id should allow the frontends to request attachments directly, using the API client: GdsApi.asset_manager.media(attachment_data_id, filename) This should make it much more convenient to preview assets, or use them for other rendering purposes (e.g. showing a CSV as a line graph).
- Loading branch information