I'm trying to make a post request in R sending an image that was read as binary. Currently, i have the following code in Python that does exactly what i need:
image = open(IMAGE_PATH, "rb").read()
payload = {"image": image}
r = requests.post(url, files=payload)
I'm trying to do exactly the same but in R, which i've not been able to do. Any advice is welcome.