By default, publish creates immutable files with URLs based on content hash. In advanced mode, you can create updatable files with stable URLs.
Your key generates a unique namespace (first 8 chars of SHA256 hash).
Files are stored at: /p/{namespace}/{filename}
$ echo '{"count": 1}' | curl -sF file=@- -F name=counter.json \
-H "X-Publish-Key: my-secret-key" https://publish.ip1.cc$ echo '{"count": 2}' | curl -sF file=@- -F name=counter.json \
-H "X-Publish-Key: my-secret-key" https://publish.ip1.cc// Save data to your namespace
async function saveData(data) {
const formData = new FormData();
formData.append('file', new Blob([JSON.stringify(data)]));
formData.append('name', 'mydata.json');
const res = await fetch('https://publish.ip1.cc', {
method: 'POST',
headers: { 'X-Publish-Key': 'my-secret-key' },
body: formData
});
return await res.text(); // URL
}
// Read it back (no auth needed)
async function loadData() {
const res = await fetch('https://publish.ip1.cc/p/a8f3b2c1/mydata.json');
return await res.json();
}
$ openssl rand -hex 32
a7c4e2f8b9d1c3e5a7c4e2f8b9d1c3e5a7c4e2f8b9d1c3e5a7c4e2f8b9d1c3e5