This code
elif content.type == "image_file":
# tester avec: "dessine un pélican sur un vélo"
file_id = content.image_file.file_id
cited_file = self.fClient.files.retrieve(file_id)
print(f"cited_image_file:{cited_file}")
returns:
FileObject(id='file-MRmbhDwREt1719ipAd9gsM', bytes=54202, created_at=1735202556, filename='c3ce8a9e-ef43-4bd0-9fdb-f49620d919b0', object='file', purpose='assistants_output', status='processed', status_details=None)
BUG: I think filename should contain the file extension (or add a mime type elsewhere).
Notice that if you do the same retrieve with a file attachement you get:
FileObject(id='file-5LQvugpVMSVuVM7oyMmTir', bytes=63, created_at=1735424970, filename='/mnt/data/exemple.csv', object='file', purpose='assistants_output', status='processed', status_details=None)
filename contains the file extension
Here is the one for an annotation:
FileObject(id='file-Kx4KyJ7gu8C3j5UqmVkW8f', bytes=88647, created_at=1733744418, filename='uploaded.pdf', object='file', purpose='assistants', status='processed', status_details=None)
filename contains the file extension