MCPcopy Index your code
hub / github.com/pyload/pyload / validateFile

Function validateFile

module/lib/MultipartPostHandler.py:123–130  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

121 opener = build_opener(MultipartPostHandler)
122
123 def validateFile(url):
124 temp = tempfile.mkstemp(suffix=".html")
125 write(temp[0], opener.open(url).read())
126 params = { "ss" : "0", # show source
127 "doctype" : "Inline",
128 "uploaded_file" : open(temp[1], "rb") }
129 print opener.open(validatorURL, params).read()
130 remove(temp[1])
131
132 if len(sys.argv[1:]) > 0:
133 for arg in sys.argv[1:]:

Callers 1

mainFunction · 0.85

Calls 3

removeFunction · 0.85
readMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected