Beispiel #1
0
 def submit_file(self, file: File):
     self.api_subf.file = {"file[]": file.fd()}
     self.api_subf.data = {**self.get_apikey(), "QUICKSAND_RERUN": 1}
     # {"QUICKSAND_BRUTE": 1, "QUICKSAND_LOOKAHEAD": 1}
     data, _ = request(self.api_subf)
     data = frmt.jsontree(data)
     return out.pformat(data)
Beispiel #2
0
 def submit_file(self, file: File):
     # HTTP 404 Not Found
     self.api_subf.cookie = self.get_apikey()
     self.api_subf.file = {"file": file.fd()}
     data, _ = request(self.api_subf)
     data = frmt.jsonvert(data)
     return out.pformat(data)
Beispiel #3
0
 def submit_file(self, file: File):
     # HTTP 405 Method Not Allowed
     self.api_subf.data = {**self.get_apikey(), "shared": "yes"}
     self.api_subf.file = {"file": (file.name, file.fd())}
     data, _ = request(self.api_subf)
     data = frmt.jsontree(data)
     return out.pformat(data)
Beispiel #4
0
 def submit_file(self, file: File):
     self.api_subf.file = {"sample[]": file.fd()}
     self.api_subf.data = {"type": "json", "message": "", "email": ""}
     data, _ = request(self.api_subf)
     if " is not a PDF file. Not processed." in data:
         return f"{file} is not a PDF file"
     data = frmt.jsontree(data)
     return out.pformat(data)
Beispiel #5
0
 def submit_file(self, file: File):
     self.api_subf.data = self.get_apikey()
     self.api_subf.file = {"file": (file.name, file.fd())}
     data, _ = request(self.api_subf)
     data = frmt.jsontree(data)
     # web.openurl(data["permalink"])
     data = frmt.jsonvert(data)
     # return out.pformat(data)
     return data
Beispiel #6
0
 def submit_file(self, file: File):
     self.api_subf.header = self.get_apikey()
     self.api_subf.file = {"file": file.fd()}
     data, _ = request(self.api_subf)
     data = frmt.jsontree(data)
     return out.pformat(data)
Beispiel #7
0
 def submit_file(self, file: File):
     self.api_subf.data = {"file": file.fd(), **self.get_apikey()}
     data, _ = request(self.api_subf)
     return data
Beispiel #8
0
 def submit_file(self, file: File):
     self.api_subf.auth = self.get_apikey(key=True, user=True)
     self.api_subf.data = {"environmentId": 100}
     self.api_subf.file = {"file": file.fd()}
     data, _ = request(self.api_subf)
     return data