Return file send stats
This commit is contained in:
parent
c727443ea3
commit
9fcd456205
1 changed files with 4 additions and 0 deletions
|
@ -191,6 +191,8 @@ class FileRequest(object):
|
|||
if connected_peer: # Just added
|
||||
connected_peer.connect(self.connection) # Assign current connection to peer
|
||||
|
||||
return {"bytes_sent": bytes_sent, "file_size": file_size, "location": params["location"]}
|
||||
|
||||
except Exception, err:
|
||||
self.log.debug("GetFile read error: %s" % Debug.formatException(err))
|
||||
self.response({"error": "File read error: %s" % Debug.formatException(err)})
|
||||
|
@ -233,6 +235,8 @@ class FileRequest(object):
|
|||
if connected_peer: # Just added
|
||||
connected_peer.connect(self.connection) # Assign current connection to peer
|
||||
|
||||
return {"bytes_sent": stream_bytes, "file_size": file_size, "location": params["location"]}
|
||||
|
||||
except Exception, err:
|
||||
self.log.debug("GetFile read error: %s" % Debug.formatException(err))
|
||||
self.response({"error": "File read error: %s" % Debug.formatException(err)})
|
||||
|
|
Loading…
Reference in a new issue