Closed
Description
Hello,
I'm trying to get a list of all the images I have uploaded. There are more then 1k so the way I used to do this is by calling imagekit.list_files
multiple times passing an increasing skip
parameter till I'm done. This is no longer working in the latest version of the SDK.
I updated my code to use ListAndSearchFileRequestOptions
but still does not work.
options = ListAndSearchFileRequestOptions(skip=0)
all_images = imagekit.list_files(options=options).list
all_images[0].name
Out[88]: '11949_1_WngYbAgnF.jpg'
In [90]: all_images[999].name
Out[90]: '58618_9_RA-33Vrng.jpg'
Now trying to skip some images, same result, no matter what I pass on skip
options = ListAndSearchFileRequestOptions(skip=1000)
all_images = imagekit.list_files(options=options).list
all_images[0].name
Out[88]: '11949_1_WngYbAgnF.jpg'
In [90]: all_images[999].name
Out[90]: '58618_9_RA-33Vrng.jpg'
Now trying to get just a set of images. It seems no matter what I pass in options nothing happens.
In [92]: options = ListAndSearchFileRequestOptions(limit=10)
...: all_images = imagekit.list_files(options=options).list
...: len(all_images)
Out[92]: 1000
Metadata
Metadata
Assignees
Labels
No labels