This is my first time using the CloudConvert API, and I attempting to perform HTML to PDF file conversion. I have read/followed the official documentation as well used the provided "Job Builder," but no matter what I try, the import/upload task is always stuck as "Waiting for Upload".
Of course, I didn't expect the program to work on the first try, but the file won't upload; there aren't any errors either. The file I'm attempting to upload is main.html, which is in the same directory as my Python file. Here is my code:
cloudconvert.configure(api_key='API_KEY', sandbox=False)
job = cloudconvert.Job.create(payload={
"tasks": {
"import-file": {
"operation": "import/upload",
"input": "upload",
"file": "main.html"
},
"convert-pdf": {
"operation": "convert",
"input_format": "html",
"output_format": "pdf",
"engine": "chrome",
"input": [
"import-file"
],
"zoom": 1,
"print_background": True,
"display_header_footer": False,
"wait_until": "load",
"wait_time": 0,
"filename": "main.pdf"
},
"output-schedule": {
"operation": "export/url",
"input": [
"convert-pdf"
],
"inline": False,
"archive_multiple_files": False
}
},
"tag": "jobbuilder"
})
I know there was an issue a few years ago on CloudConvert's end that caused all uploaded files to be marked as "waiting." Is there something wrong with my code, or could it be a repeat of that situation?