I uploaded 4 objects to S3. The keys of the object are as follows:
4eec12eb0a588620cccad16f/MumDad70s.jpg
4eec12eb0a588620cccad16f/NathanI-1.jpg
4eec12eb0a588620cccad16f/ProfilePic.png
4eec12eb0a588620cccad16f/nathan-orange.jpg
My code for requesting objects:
var req = new ListObjectsRequest()
.WithBucketName(BucketName)
.WithPrefix(jobid + "/")
.WithDelimiter("/");
var objs = _s3Client.ListObjects(req);
In the answer, although the prefix is not really its own object, but rather a string preceding the key of the actual objects, I get the following 5 returned objects:
4eec12eb0a588620cccad16f/
4eec12eb0a588620cccad16f/MumDad70s.jpg
4eec12eb0a588620cccad16f/NathanI-1.jpg
4eec12eb0a588620cccad16f/ProfilePic.png
4eec12eb0a588620cccad16f/nathan-orange.jpg
Why does the prefix return as if it were a unique object? How can I simply return files with the specified prefix without sending a filter after filtering to get rid of the prefix object?
source
share