aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2014-12-21 23:06:56 -0800
committerchrislusf <chris.lu@gmail.com>2014-12-21 23:06:56 -0800
commited07d3c8c67b76d85722d0c000b7ce0c0fb24e0a (patch)
treea47b264b52cefa2b36ffff3fb0cecf81d8484b85
parent33602a03a4fd5b3d2be4f98a961aeab3608e32b1 (diff)
parentc02a2e25c48a33a12053c3ee658bae6f620baffc (diff)
downloadseaweedfs-ed07d3c8c67b76d85722d0c000b7ce0c0fb24e0a.tar.xz
seaweedfs-ed07d3c8c67b76d85722d0c000b7ce0c0fb24e0a.zip
Merge branch 'master' of https://github.com/chrislusf/weed-fs
-rw-r--r--docs/ttl.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/ttl.rst b/docs/ttl.rst
index 35900b0d8..ff579686b 100644
--- a/docs/ttl.rst
+++ b/docs/ttl.rst
@@ -12,12 +12,16 @@ How to use it?
Assume we want to store a file with TTL of 3 minutes.
First, ask the master to assign a file id to a volume with a 3-minute TTL:
+
.. code-block:: bash
+
> curl http://localhost:9333/dir/assign?ttl=3m
{"count":1,"fid":"5,01637037d6","url":"127.0.0.1:8080","publicUrl":"localhost:8080"}
Secondly, use the file id to store on the volume server
+
.. code-block:: bash
+
> curl -F "file=@x.go" http://127.0.0.1:8080/5,01637037d6?ttl=3m
After writing, the file content will be returned as usual if read before the TTL expiry. But if read after the TTL expiry, the file will be reported as missing and return the http response status as not found.