Code preview
Browsing a bucket's code as a file tree, refs and preview limits.
- Can I edit files in the Code Buckets preview?No. The preview is read-only. Change the code locally and upload a new zip (or a folder with target_path).FAQ
- Can I keep my Git history in Code Buckets?Yes, inside the zip: a .git folder is stored in the encrypted zip, though the preview skips it. Code Buckets doesn't read Git history.FAQ
- Can I search inside my code in Code Buckets?The Console's Files tab has a search box to find files. For full-text search, download the zip or the files and search locally.FAQ
- Does the unpacked preview count toward my storage?The docs say storage counts stored zips and assets plus unfinished uploads. The preview tree isn't listed as counting.FAQ
- How are images and other binary files shown in the preview?The file API returns binary files as base64 with binary: true. Add download=1 for raw bytes.FAQ
- How do I browse my code in the Console?Open the bucket and go to the Files tab. Search for a file and click it to see it with syntax highlighting.How-to
- How do I list the files in my code with the API?GET /v1/buckets/{bucket_id}/tree returns every file and folder as flat paths, with the ref it read.How-to
- How do I look at an older version of my code?Find the ref in an earlier code.updated or backup event, then read the tree or files with ?ref=.How-to
- How do I read one file from my code with the API?GET /v1/buckets/{bucket_id}/files/{path} returns the content (UTF-8 or base64) and a detected language for highlighting.How-to
- I get 400 bad_ref or bad_path. What's wrong?ref must be exactly 40 hex characters, and path must be a file path in the tree with each segment URL-encoded.Troubleshooting
- Is the preview copy of my code encrypted?The preview tree is kept in private, access-controlled storage, but not encrypted with your bucket's key. Turn preview off if that matters.FAQ
- My zip's preview failed. Is my file lost?No. A failed preview means the zip couldn't be read for unpacking; the zip itself is still stored and downloadable.Troubleshooting
- Some files from my zip are missing in the preview. Why?Large files, files past the per-zip limits, .git/, __MACOSX/, .DS_Store, unsafe paths and password-protected entries are skipped.Troubleshooting
- What are the limits of code preview?Files up to 2 MB each go into the tree, up to about 96 MB and 20,000 files per zip. Bigger files stay in the stored zip.Reference
- What do the preview statuses mean?pending, extracting, ready, partial (some files only in the zip), failed (zip unreadable but stored) and off (preview disabled).Reference
- What is a ref?A ref is a 40-character id for one version of a bucket's code tree. Reading with an explicit ref always returns the same content.Explainer
- What is code preview?When preview is on, uploaded zips unpack into a code tree you can browse with syntax highlighting in the Console or read over the API.Explainer
- Which languages does the code preview highlight?The file API returns a detected language, like typescript, python or json, that the Console's viewer uses for highlighting.FAQ
- Why are some preview requests much faster than others?Requests with an explicit ?ref= never change, so they're cached at the edge and return in milliseconds. Pass the ref whenever you can.FAQ
- Why did the top folder of my zip disappear in the preview?If every file sits inside one top folder, like project-main/, that folder is dropped so files start at the root. preview.stripped_folder says which.FAQ
- Why isn't my .git folder in the preview?.git/, __MACOSX/ and .DS_Store are always skipped from the code tree. They're still in the stored zip.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.