According to the documentation here: https://docs.q2developer.com/api_references/q2_sdk/ardent/index.html#q2_sdk.ardent.file_upload.File.upload_from_file
The data parameter either takes a BytesIO object or a string, but it specifies that the string is a path to a file not the file itself. If the data is a string datatype then you need to convert it to a BytesIO object.
-Trey
That makes sense I need to convert the data into a BytesIO object. But since the image data returned is a string because it was part of the response from GetStatementImage, what I want to know now is what type of data is the string suppose to represent. And would I need to convert the string back to it's original type before the upload process. The intention is to display the statement image in PDF. Currently, I'm able to upload the data and get a download url but I'm getting a "Failed to load PDF Document" error when opening it.
—