MCPcopy
hub / github.com/pallets/werkzeug / form_data_consumer

Function form_data_consumer

tests/test_formparser.py:20–34  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

18
19@Request.application
20def form_data_consumer(request):
21 result_object = request.args["object"]
22 if result_object == "text":
23 return Response(repr(request.form["text"]))
24 f = request.files[result_object]
25 return Response(
26 b"\n".join(
27 (
28 repr(f.filename).encode("ascii"),
29 repr(f.name).encode("ascii"),
30 repr(f.content_type).encode("ascii"),
31 f.stream.read(),
32 )
33 )
34 )
35
36
37def get_contents(filename):

Callers

nothing calls this directly

Calls 2

ResponseClass · 0.90
readMethod · 0.45

Tested by

no test coverage detected