Public and private files
Visibility for buckets and files, public links and the image and file CDN hosts.
- Are my files private by default?Yes. Every bucket and file is private unless you choose otherwise. Private files can only be read with your key and Account ID or in the Console.FAQ
- Can I change the cache settings of my public files?No. Images are cached for a year as immutable and other files for 60 seconds. Upload a new file to change content.FAQ
- Can I host a website from a public bucket?Not as a full website: HTML on the files host is served with a sandboxing CSP, so scripts can't run. It's great for images and downloads.FAQ
- Can I host web fonts in Code Buckets?Yes. Upload font files with their content type, make them public, and load them from your CSS. CORS allows any site.How-to
- Can I make my code preview public?No. The code preview tree (files unpacked from zips) is never public. To publish a code file, upload it as an asset.FAQ
- Can I see how many times my public files were opened?GET /v1/usage shows this month's public link traffic: requests, bytes and tokens. Per-file counts aren't published.FAQ
- Can I serve my site's JavaScript and CSS files from Code Buckets?Yes, as public files on files.cdn-buckets with the right content type and CORS. They're cached 60 seconds; traffic counts as tokens.FAQ
- Can I share a private file with one person without making it public?There's no per-person or expiring link. Make it public, share, then make it private again, or send them the file directly.FAQ
- Can I stream a video from a public link?Yes. The files host supports Range requests (206), so videos stream and seek. Set content_type to the right video type when uploading.How-to
- Can I use my own domain for public file links?The docs don't offer custom domains. Public links use img.cdn.clatterlabs.xyz and files.cdn-buckets.clatterlabs.xyz.FAQ
- Can other sites use my public images on their pages?Yes. Public links work for anyone and allow CORS, and their traffic counts toward your tokens. Make an image private to stop it.FAQ
- Can other websites load my public files with JavaScript?Yes. Both public hosts send Access-Control-Allow-Origin: *, so any website can fetch public files.FAQ
- Can search engines find my public files?Anyone with a link can open a public file, and links you publish on web pages can be found. Keep sensitive files private.FAQ
- Do public links expire?No. A public link works while the file is public and stored. It stops when you make it private or delete it.FAQ
- Do views of my public links cost tokens?Yes. Public link traffic counts for your account like API downloads: 1 token per request plus 1 per MiB, shown in usage.FAQ
- How do bucket visibility and file visibility work together?A file is public or private by its own setting, or follows the bucket when set to inherit. effective_visibility shows the result.Explainer
- How do I get a file's current public link from the API?GET …/objects/{object_id}/public-url returns url, served_as, content_type and whether the link works right now.How-to
- How do I list only my public files?List objects and filter on effective_visibility == public in your code. Each object also carries its public_url.How-to
- How do I make a file public and get its link?Set the file's visibility to public in the Console or with PATCH …/objects/{object_id}/visibility. The response includes public_url.How-to
- How do I make a public file private again?Set its visibility to private (or inherit in a private bucket). The link stops working on the next request.How-to
- How do I make a public link download instead of opening in the browser?Add ?download=1 to a files.cdn-buckets link. On an old image link, ?download=1 gets the original from the files host.How-to
- How do I make a whole bucket public with the API?PATCH /v1/buckets/{bucket_id}/visibility with "public", or Settings › Access in the Console. Files on inherit follow it.How-to
- How do I share a PDF with a public link?Upload the PDF with content_type application/pdf, make it public, and share its link. It opens in the browser; add ?download=1 to download.How-to
- How do I share a release zip for people to download?Upload the zip as an asset, make it public, and share its files.cdn-buckets link with ?download=1.How-to
- How do I use Code Buckets images on my website or in emails?Make the image public, copy its img.cdn.clatterlabs.xyz link and put it in <img> tags, Markdown, emails or Open Graph tags.How-to
- How does Code Buckets decide a file is an image?Its content_type is image/*, or, when that's empty or application/octet-stream, its extension is an image one like .png or .webp.FAQ
- How long do public links stay cached?Images are cached for a year as immutable; other files for 60 seconds. Turning a file private blocks the link on the next request.FAQ
- I made an image public again and its old link still gives 404. Why?When an image stops being public its id is retired for good. Making it public again gives it a new id and a new public_url.Troubleshooting
- I replaced an image but people still see the old one. Why?Image links are immutable and cached for a year. Upload the new image as a new file and use its new link.FAQ
- My public link returns 404. What's wrong?The file is private (directly or through its bucket), was deleted, isn't finished uploading, or it's an image whose old id was retired.Troubleshooting
- What does served_as mean on an object?served_as is image when the public link is on img.cdn.clatterlabs.xyz, or file when it's on files.cdn-buckets.clatterlabs.xyz.Reference
- What does the files.cdn-buckets host support?Inline display, ?download=1, HEAD, single Range requests, ETag/If-None-Match, sandboxing CSP for HTML/SVG/XML, and 60-second caching.Reference
- What happens to my public links if I run out of monthly tokens?When the month's tokens are used, requests answer 402 quota_exceeded until next month. Watch public_files usage and contact us for more.Troubleshooting
- What happens to public links when I switch a public bucket to private?Files set to inherit become private and their links stop on the next request. Files set to public explicitly stay public.FAQ
- Why do some public links use img.cdn and others files.cdn-buckets?Images get https://img.cdn.clatterlabs.xyz/<id>, cached for a year. Everything else gets files.cdn-buckets.clatterlabs.xyz, cached 60 seconds.Explainer
- Why does my old files.cdn-buckets image link redirect?Older files-host links to images redirect (308) to the image's img.cdn.clatterlabs.xyz link. Add ?download=1 for the original.FAQ
- Why doesn't my image link contain the file name?Image links use an opaque 22-character id, with no file name, bucket or object id, so they don't reveal anything about your storage.FAQ
- Why don't scripts run in HTML or SVG files I made public?HTML, SVG and XML on the files host are served with a sandboxing Content-Security-Policy, so they can't run scripts on our domain.FAQ
Still need help?
Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.
Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyzFor deleting your whole account or the data of one service.