Merge pull request #1212 from filecoin-project/fix/remote-put-commit
remote: Fix put in commit
This commit is contained in:
commit
6eb342b8ee
@ -108,12 +108,22 @@ func (sm *StorageMinerAPI) remotePutSector(w http.ResponseWriter, r *http.Reques
|
||||
}
|
||||
|
||||
// This is going to get better with worker-to-worker transfers
|
||||
path, err := sm.SectorBuilder.AllocSectorPath(fs.DataType(vars["type"]), id, true)
|
||||
|
||||
path, err := sm.SectorBuilder.SectorPath(fs.DataType(vars["type"]), id)
|
||||
if err != nil {
|
||||
if err != fs.ErrNotFound {
|
||||
log.Error(err)
|
||||
w.WriteHeader(500)
|
||||
return
|
||||
}
|
||||
|
||||
path, err = sm.SectorBuilder.AllocSectorPath(fs.DataType(vars["type"]), id, true)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
w.WriteHeader(500)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
mediatype, _, err := mime.ParseMediaType(r.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user