Reputation: 1036
I went through the documentation of minio-go-api. But didn't get any solution for that, as objects are sorted based on the alphabetic order.
A hack way, will be to first read all the objects and then take last modified date from each object and form the new list, which is not at all feasible for production
Upvotes: 2
Views: 6672
Reputation: 407
@Siddhanta Rath, One way to handle this is to use mc
tool. Command mc find --newer
and mc find --older
will handle this. But internally, it will do listObjects
and do the sorting for you.
The other approach would be to subscribe to notification and make sure that there is a list of uploaded objects in a database.
Upvotes: 1
Reputation: 270114
There is no capability to specify sort order in the Amazon S3 API. Your application will need to sort the objects into the desired oder.
Upvotes: 0