MindTouch uses CloudFront, an Amazon content delivery network (CDN), to stream attachments quickly and safely.
If you notice issues with your attachments, you may need to allowlist the domain
What are the benefits of streaming attachments through CloudFront?
The two most important benefits of streaming attachments through CloudFront are speed and security:
- Speed. Users download files from a location that is geographically closer to them, potentially making delivery faster.
- Security. Cryptographic signatures when generating attachment URLs prevents tampering from outside sources.
Do all MindTouch sites have this feature?
Currently, only public (available to users who are not logged in) MindTouch sites have this feature enabled and only for attachments that have no permissions on them, meaning they are stored on a page with no added restrictions.
How do attachments work?
When a user uploads a file as an attachment to a page, it is actually being uploaded onto a separate server and referenced with a MindTouch API-generated URL. The API-generated URL is mapped to the location of the file and saved in a separate location. When an end user requests an attachment, MindTouch transforms that request into a CloudFront link which then redirects the user to where the attachment is stored.
How do I stream attachments?
To stream attachments and link files to be redirected automatically, perform the following steps:
- Open the page in Edit mode.
- From the editor toolbar, select View > Source.
- Verify attachments are referenced as
/@api/deki/files/[id]/[file].[ext]to automatically redirect to the new file location.
What are the mechanics behind attachment streaming?
All links to attachments rendered in MindTouch use the streaming mechanism
https://domain.com/@api/deki/files/.... Behind the scenes, the mechanism redirects users to a URL beginning with
https://files.mtstatic.com. The redirected URL is invisible to MindTouch users but can be displayed when opening the link
/@api/deki/files/ in a new tab/window.
Do NOT use the
https://files.mtstatic.com URL to reference your file attachments; it is cached and will expire after 60 minutes.