add fid, url to filer post, adjust to changed folder structure

Chris Lu 2016-06-02 20:51:14 -07:00
parent 22bef28f7c
commit 251fe3219a
3 changed files with 4 additions and 4 deletions

4
API.md

@ -302,11 +302,11 @@ Examples:
```bash ```bash
# Basic Usage: # Basic Usage:
> curl -F file=@report.js "http://localhost:8888/javascript/" > curl -F file=@report.js "http://localhost:8888/javascript/"
{"name":"report.js","size":866} {"name":"report.js","size":866, "fid":"7,0254f1f3fd","url":"http://localhost:8081/7,0254f1f3fd"}
> curl "http://localhost:8888/javascript/report.js" # get the file content > curl "http://localhost:8888/javascript/report.js" # get the file content
... ...
> curl -F file=@report.js "http://localhost:8888/javascript/new_name.js" # upload the file with a different name > curl -F file=@report.js "http://localhost:8888/javascript/new_name.js" # upload the file with a different name
{"name":"report.js","size":866} {"name":"report.js","size":866, "fid":"3,034389657e","url":"http://localhost:8081/3,034389657e"}
> curl "http://localhost:8888/javascript/?pretty=y" # list all files under /javascript/ > curl "http://localhost:8888/javascript/?pretty=y" # list all files under /javascript/
{ {
"Directory": "/javascript/", "Directory": "/javascript/",

@ -88,4 +88,4 @@ curl "http://localhost:8888/path/to/sources/?pretty=y"
curl "http://localhost:8888/path/to/sources/?lastFileName=abc.txt&limit=50&pretty=y" curl "http://localhost:8888/path/to/sources/?lastFileName=abc.txt&limit=50&pretty=y"
``` ```
The Redis and Cassandra backends are currently implemented as ["flat namespace" stores](https://github.com/chrislusf/seaweedfs/blob/master/go/filer/flat_namespace/flat_namespace_filer.go), so filers using them may not perform directory listings at this time. The Redis and Cassandra backends are currently implemented as ["flat namespace" stores](https://github.com/chrislusf/seaweedfs/blob/master/weed/filer/flat_namespace/flat_namespace_filer.go), so filers using them may not perform directory listings at this time.

@ -8,7 +8,7 @@ To support large files, SeaweedFS supports these two kinds of files:
This piece of code shows the json file structure: This piece of code shows the json file structure:
https://github.com/chrislusf/seaweedfs/blob/master/go/operation/chunked_file.go#L24 https://github.com/chrislusf/seaweedfs/blob/master/weed/operation/chunked_file.go#L24
``` ```
type ChunkInfo struct { type ChunkInfo struct {