Show More
@@ -149,8 +149,18 b' def lfs_objects_oid_upload(request):' | |||
|
149 | 149 | oid, repo, store_location=request.registry.git_lfs_store_path) |
|
150 | 150 | engine = store.get_engine(mode='wb') |
|
151 | 151 | log.debug('LFS: starting chunked write of LFS oid: %s to storage', oid) |
|
152 | ||
|
153 | body = request.environ['wsgi.input'] | |
|
154 | ||
|
152 | 155 | with engine as f: |
|
153 | for chunk in FileWrapper(request.body_file_seekable, blksize=64 * 1024): | |
|
156 | blksize = 64 * 1024 # 64kb | |
|
157 | while True: | |
|
158 | # read in chunks as stream comes in from Gunicorn | |
|
159 | # this is a specific Gunicorn support function. | |
|
160 | # might work differently on waitress | |
|
161 | chunk = body.read(blksize) | |
|
162 | if not chunk: | |
|
163 | break | |
|
154 | 164 | f.write(chunk) |
|
155 | 165 | |
|
156 | 166 | return {'upload': 'ok'} |
General Comments 0
You need to be logged in to leave comments.
Login now