-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Hi,
I am trying to upload my image:
import base64
import os
import sys
from imagekitio import ImageKit
from imagekitio.models.UploadFileRequestOptions import UploadFileRequestOptions
PRIVATE_KEY = os.environ.get('PRIVATE_KEY')
PUBLIC_KEY = os.environ.get('PUBLIC_KEY')
imagekit = ImageKit(
private_key='private',
public_key='public',
url_endpoint='https://ik.imagekit.io/nb4gbrqqe'
)
url = "event20230225_133517_27.jpg"
upload = imagekit.upload(
file=open(url, "rb"),
file_name="test.jpg",
options=UploadFileRequestOptions(
tags = ["test"]
)
)
list_files = imagekit.list_files()
print (list_files.response_metadata.raw)
But imagekitio.io ist showing just:
When I extract the metadata, it looks like the image was not uploaded as image type:
{'type': 'file', 'name': 'test_doAbVVtZJ.jpg', 'createdAt': '2023-02-25T19:42:54.915Z', 'updatedAt': '2023-02-25T19:42:55.118Z', 'fileId': '63fa64bee809dd54b091d551', 'tags': ['test'], 'AITags': None, 'versionInfo': {'id': '63fa64bee809dd54b091d551', 'name': 'Version 1'}, 'embeddedMetadata': {}, 'customCoordinates': None, 'customMetadata': {}, 'isPrivateFile': False, 'url': 'https://ik.imagekit.io/nb4gbrqqe/test_doAbVVtZJ.jpg', 'thumbnail': 'https://ik.imagekit.io/demo/img/static-file-1.png', 'fileType': 'non-image', 'filePath': '/test_doAbVVtZJ.jpg', 'size': 90}]
My manually uploaded image show 'fileType': 'image'.
How can I upload my images as image type?
Thanks in adavance
Stefanie
