mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 01:03:32 +08:00
also return publicUrl when assigning the fid
git-svn-id: https://weed-fs.googlecode.com/svn/trunk@48 282b0af5-e82d-9cf1-ede4-77906d7719d0
This commit is contained in:
@@ -39,7 +39,7 @@ func dirLookupHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
func dirAssignHandler(w http.ResponseWriter, r *http.Request) {
|
func dirAssignHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
fid, machine, err := mapper.PickForWrite()
|
fid, machine, err := mapper.PickForWrite()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
writeJson(w, r, map[string]string{"fid": fid, "url": machine.Url})
|
writeJson(w, r, map[string]string{"fid": fid, "url": machine.Url, "publicUrl":machine.PublicUrl})
|
||||||
} else {
|
} else {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
writeJson(w, r, map[string]string{"error": err.Error()})
|
writeJson(w, r, map[string]string{"error": err.Error()})
|
||||||
|
Reference in New Issue
Block a user