1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-08 10:07:25 +02:00

Merge pull request #69 from stuartpb/patch-1

Use proper HTTP verbs in README curl examples
This commit is contained in:
chrislusf 2015-01-28 23:24:35 -08:00
commit 440af8033d

View file

@ -63,13 +63,13 @@ Seaweed-FS uses HTTP REST operations to write, read, delete. The return results
Here is a simple usage on how to save a file:
```
> curl http://localhost:9333/dir/assign
> curl -X POST http://localhost:9333/dir/assign
{"count":1,"fid":"3,01637037d6","url":"127.0.0.1:8080","publicUrl":"localhost:8080"}
```
First, send a HTTP request to get an fid and a volume server url.
```
> curl -F file=@/home/chris/myphoto.jpg http://127.0.0.1:8080/3,01637037d6
> curl -X PUT -F file=@/home/chris/myphoto.jpg http://127.0.0.1:8080/3,01637037d6
{"size": 43234}
```
Second, send a HTTP multipart POST request to the volume server url+'/'+fid, to really store the file content.
@ -119,7 +119,7 @@ If you want a nicer URL, you can use one of these alternative URL formats:
### Rack-Aware and Data Center-Aware Replication ###
Seaweed-FS apply the replication strategy on a volume level. So when you are getting a file id, you can specify the replication strategy. For example:
```
curl http://localhost:9333/dir/assign?replication=001
curl -X POST http://localhost:9333/dir/assign?replication=001
```
Here is the meaning of the replication parameter