Hey,
I’m trying to automate the creation of a “branding” object in Django, which includes parsing a .png uploaded to Hubspot through a Form-Submission.
This is what I have right now:
import requests
from PIL import Image
def hs_parse_img(url):
image = Image.open(requests.get(url, stream=True).raw)
return image
hs_parse_img(
"https://api-na1.hubspot.com/form-integrations/v1/uploaded-files/signed-url-redirect/......"
)
When I try to run the script I get the following error:
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at …>
Is it even possible to utilize fieldType: “file” properties in this way?
Thanks