MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / readMultipartHeaders

Method readMultipartHeaders

plugins/Bigfile/BigfilePlugin.py:115–124  ·  view source on GitHub ↗
(self, wsgi_input)

Source from the content-addressed store, hash-verified

113 })
114
115 def readMultipartHeaders(self, wsgi_input):
116 found = False
117 for i in range(100):
118 line = wsgi_input.readline()
119 if line == b"\r\n":
120 found = True
121 break
122 if not found:
123 raise Exception("No multipart header found")
124 return i
125
126 def actionFile(self, file_path, *args, **kwargs):
127 if kwargs.get("file_size", 0) > 1024 * 1024 and kwargs.get("path_parts"): # Only check files larger than 1MB

Callers 1

actionBigfileUploadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected