MCPcopy
hub / github.com/django/django / file_complete

Method file_complete

django/core/files/uploadhandler.py:238–252  ·  view source on GitHub ↗

Return a file object if this handler is activated.

(self, file_size)

Source from the content-addressed store, hash-verified

236 return raw_data
237
238 def file_complete(self, file_size):
239 """Return a file object if this handler is activated."""
240 if not self.activated:
241 return
242
243 self.file.seek(0)
244 return InMemoryUploadedFile(
245 file=self.file,
246 field_name=self.field_name,
247 name=self.file_name,
248 content_type=self.content_type,
249 size=file_size,
250 charset=self.charset,
251 content_type_extra=self.content_type_extra,
252 )
253
254
255def load_handler(path, *args, **kwargs):

Callers

nothing calls this directly

Calls 2

seekMethod · 0.80

Tested by

no test coverage detected