file-nodes: added streaming remote attributes for vcsserver.
- this will enable doing a streaming raw content or raw downloads of large files without transfering them over to enterprise for pack & repack using msgpack - msgpack has a limit of 4gb and generally pack+repack for 2gb is very slow
This commit is contained in:
parent
0ae89b9907
commit
de8ff5bcfa
11 changed files with 252 additions and 433 deletions
|
|
@ -844,10 +844,9 @@ class RepoFilesView(RepoAppView):
|
|||
if disposition == 'attachment':
|
||||
disposition = self._get_attachement_headers(f_path)
|
||||
|
||||
def stream_node():
|
||||
yield file_node.raw_bytes
|
||||
stream_content = file_node.stream_bytes()
|
||||
|
||||
response = Response(app_iter=stream_node())
|
||||
response = Response(app_iter=stream_content)
|
||||
response.content_disposition = disposition
|
||||
response.content_type = mimetype
|
||||
|
||||
|
|
@ -883,10 +882,9 @@ class RepoFilesView(RepoAppView):
|
|||
|
||||
disposition = self._get_attachement_headers(f_path)
|
||||
|
||||
def stream_node():
|
||||
yield file_node.raw_bytes
|
||||
stream_content = file_node.stream_bytes()
|
||||
|
||||
response = Response(app_iter=stream_node())
|
||||
response = Response(app_iter=stream_content)
|
||||
response.content_disposition = disposition
|
||||
response.content_type = file_node.mimetype
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue