Can't list all keys on Spaces: no continuation token

April 30, 2018 315 views
Node.js Ubuntu 16.04
bor55h
By:
bor55h

Hey guys.

I'm using Digital Ocean spaces to store the files the users upload.
I currently have around 6 million.
I'm using Node JS and AWS-SDK to manage all these files, and right now I want to get the list of keys of all these files.
However, when I try S3.listObjectV2, it doesn't return any continuation token or anything so that I'm stuck with the first 1000 files.
Looking forward to your reply.

1 Answer

Hello. Sorry for the trouble. We've noted here in the API documentation that the version 2 type list is not currently supported by the Spaces API.

If you use listObjects instead of listObjectsV2 you should see a result which includes the continuation token.

Have another answer? Share your knowledge.