Flat / Expiring links
Share files with an expiration date.
Keep a review copy online for a week. Set the deadline when you publish, and Flat stops serving the files when the review period ends.
Set an expiryChoose a duration or an exact deadline through the CLI or API.
Set a time limit or an exact deadline
30m / 2h / 7d
Choose how long to share
Set a duration when publishing a temporary file or review copy.
--expires-at
End at a specific date and time
Use an exact deadline for an event or review period. Include the timezone so access ends at the time you intend.
How to create an expiring file link
Sign in to the CLI and replace the example file path with your own.
- 01
Publish for seven days
Use a folder path to apply the same deadline to a website or file collection.
npx -y @getflat/cli deploy ./review.pdf --ttl 7d - 02
Or choose an exact deadline
Replace the timestamp placeholder with a future date, time, and UTC offset. Use this instead of
--ttl.npx -y @getflat/cli deploy ./review.pdf --expires-at "YYYY-MM-DDTHH:MM:SS+02:00"
One deadline for all links to the upload
Expiry applies to the upload's preview and direct file links, including access through a custom domain.
Expiry questions
How do I check the deadline?
Run npx -y @getflat/cli deployment list and find the upload's EXPIRES value. The CLI shows the date and time in UTC.
Can I reuse the address for another upload?
Yes. Publish the files and point your named address or custom domain to the new upload.
Set an expiry for your next upload.
Choose a duration or a date in the publish command.