##// END OF EJS Templates
fix: lfs chunked uploads....
super-admin -
r1280:b2259b07 default
parent child Browse files
Show More
@@ -18,6 +18,7 b''
18 import re
18 import re
19 import logging
19 import logging
20
20
21 from gunicorn.http.errors import NoMoreData
21 from pyramid.config import Configurator
22 from pyramid.config import Configurator
22 from pyramid.response import Response, FileIter
23 from pyramid.response import Response, FileIter
23 from pyramid.httpexceptions import (
24 from pyramid.httpexceptions import (
@@ -166,9 +167,14 b' def lfs_objects_oid_upload(request):'
166 # read in chunks as stream comes in from Gunicorn
167 # read in chunks as stream comes in from Gunicorn
167 # this is a specific Gunicorn support function.
168 # this is a specific Gunicorn support function.
168 # might work differently on waitress
169 # might work differently on waitress
170 try:
169 chunk = body.read(blksize)
171 chunk = body.read(blksize)
172 except NoMoreData:
173 chunk = None
174
170 if not chunk:
175 if not chunk:
171 break
176 break
177
172 f.write(chunk)
178 f.write(chunk)
173
179
174 return {'upload': 'ok'}
180 return {'upload': 'ok'}
General Comments 0
You need to be logged in to leave comments. Login now