Closed peterfarrell closed 1 month ago
So the pdf_html is just a string in this case?
@stumpylog correct. I updated the original body of the issue with a more fleshed out example.
For that stumble upon this later, when using the Python Requests library and post()
-- the files
argument allows you to "send strings to be received as files." This avoids having to write a temp file to disk if you already have something as a variable in memory.
Ref: https://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file
Ok, there's nothing implemented currently, though it shouldn't be difficult to add. I'm a little short on time myself until maybe next week, if you'd like to take a crack at it.
I could see accepting some additional items, such as StringIO or BinaryIO, and just wrapping the string up with that and using much of the existing code
Eh, I'm interested enough. This shouldn't take long
If you could give it a try and some feedback, #30
@stumpylog I can give it a whirl next Tuesday.
We generate most of HTML document on the fly using a Django/Jinja template and have the HTML in a variable. Simple example using the Requests library.
I looked but it appears there is not a way to via the client here to pass HTML blob as a variable. Is there a way to do that?