in workflow2_docsplitter/sample_request_folder/sample_local_request.py [0:0]
def split_local_pdf(dns_name, input_pdf_path, bucket_name, endpoint_arn):
if dns_name.endswith("/"):
path = "local_file"
else:
path = "/local_file"
with open(input_pdf_path, "rb") as file:
files = {
"input_pdf_file": file
}
url = dns_name + f"{path}?bucket_name={bucket_name}&endpoint_arn={endpoint_arn}"
response = requests.post(url, files=files)
print(response.text)