Sharing Assets Securely
A guide for content creators on generating and managing public share links for media files.
On this page
Sharing media assets (images, videos, documents) with external users is a critical feature for SveltyCMS. This guide covers how to generate secure, tokenized links and what the recipient experience entails.
π― Goal
To make specific private files accessible to designated third parties while maintaining security through unique tokens and optional password protection.
π Prerequisites (The Admin Workflow)
Before generating a share link, you must:
- Ensure the media asset is correctly uploaded into SveltyCMS.
- Navigate to the mediaβs detailed management view.
- Activate the βSharingβ toggle and configure the necessary parameters (e.g., token lifetime, password protection).
π οΈ The Sharing Process (Step-by-step)
- Select Asset: Go to
Media Libraryand select the file you wish to share. - Open Share Settings: Click the βShareβ button on the asset details pane.
- Configure Link Parameters:
- Token Generation: The system automatically generates a unique, cryptographically secure token (e.g.,
aBc1XyZ9). Save this link securely. This token is your access key. - Expiration: Set the desired expiration date/time for the link. After this time, the link will automatically fail and become inaccessible.
- Password Protection (Optional): If the content must be restricted, enable password protection. The system will store a salted hash of your provided password in the assetβs metadata.
- Token Generation: The system automatically generates a unique, cryptographically secure token (e.g.,
π€ The Recipient Experience (What happens next)
When a recipient clicks the generated link (https://sveltycms.com/share/[token]?id=[mediaId]), they will land on our dedicated, optimized share page:
- Success: If the token is valid and active, the user sees the file details and an immediate download button.
- Password Required: If password protection was enabled, the user must enter the correct password before the download link becomes active.
- Failure Cases (Security Checks):
- Expired Token: The system returns a
410 Gonestatus, informing the user that the link has expired. - Invalid Token/Missing ID: The system returns a
404 Not Found.
- Expired Token: The system returns a
Do not manually share raw media URLs. Always use the generated tokenized link provided by SveltyCMS to ensure the asset is properly tracked, time-limited, and secured.
βοΈ Technical Mechanics (For Deep Understanding)
The sharing mechanism relies on a multi-layered validation process:
This single endpoint performs three checks sequentially, which must all pass for access: β¦
---
## Related
- [Getting Started](/docs/getting-started)
- [Architecture Overview](/docs/reference/architecture/index)
- [Security Overview](/docs/reference/security/index)