MCPcopy
hub / github.com/django/django / handle_file_complete

Method handle_file_complete

django/http/multipartparser.py:373–385  ·  view source on GitHub ↗

Handle all the signaling that takes place when a file is complete.

(self, old_field_name, counters)

Source from the content-addressed store, hash-verified

371 return self._post, self._files
372
373 def handle_file_complete(self, old_field_name, counters):
374 """
375 Handle all the signaling that takes place when a file is complete.
376 """
377 for i, handler in enumerate(self._upload_handlers):
378 file_obj = handler.file_complete(counters[i])
379 if file_obj:
380 # If it returns a file object, then set the files dict.
381 self._files.appendlist(
382 force_str(old_field_name, self._encoding, errors="replace"),
383 file_obj,
384 )
385 break
386
387 def sanitize_file_name(self, file_name):
388 """

Callers 1

_parseMethod · 0.95

Calls 3

force_strFunction · 0.90
file_completeMethod · 0.45
appendlistMethod · 0.45

Tested by

no test coverage detected