MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / add_file

Method add_file

thirdparty/clientform/clientform.py:1435–1444  ·  view source on GitHub ↗
(self, file_object, content_type=None, filename=None)

Source from the content-addressed store, hash-verified

1433 self.__dict__[name] = value
1434
1435 def add_file(self, file_object, content_type=None, filename=None):
1436 if not hasattr(file_object, "read"):
1437 raise TypeError("file-like object must have read method")
1438 if content_type is not None and not isstringlike(content_type):
1439 raise TypeError("content type must be None or string-like")
1440 if filename is not None and not isstringlike(filename):
1441 raise TypeError("filename must be None or string-like")
1442 if content_type is None:
1443 content_type = "application/octet-stream"
1444 self._upload_data.append((file_object, content_type, filename))
1445
1446 def _totally_ordered_pairs(self):
1447 # XXX should it be successful even if unnamed?

Callers

nothing calls this directly

Calls 2

isstringlikeFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected