javascript - How to filter .mp3 files using Amazon S3 listObjects -


i'm using amazon s3 service node.js , want filter .mp3 files in directory, using amazon s3 listobjects(). there prefix parameter there no sufix. there way using regular expression or filter *.mp3 or something?

this function reference http://docs.aws.amazon.com/awsjavascriptsdk/latest/aws/s3.html#listobjects-property

var prefix = "mys3dir/"; bucket.listobjects({prefix:prefix}, function(err, data){     //do data }); 

nope. that's not possible s3. can filter prefix sever-side. has fact s3 not have true key hierarchy, it's key->object store, , prefix matching works there.
if want suffix matching have pull out name of keys , inspect them client side.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -