Enable wildcard character inside the list blob API

Hey Guys

just starting with @vercel/blob and love to work with it so far. It would be great if wildcards would be supported in prefix that would be a great benefit:

const result = await list({prefix: %${searchString}%})

Would be great if you would consider this

Cheers

Hi there,

Thanks for sharing the feedback. I have forwarded this to relevant team. :slight_smile:

Thanks! It would also be great if the search params are case insensitive or at least there would be a way to disable it.

Hey @dohomi thanks for the feedback.

Can you precise what you mean by:

It would be great if wildcards would be supported in prefix

?

As of today this is already supported, if you do:

const blobs = await list({ prefix: `${userId}/photos/` });

And if userId is already a variable in your file then it will list all files under user123/photos/* (if you’re dealing with the user123. If you’re looking for a different feature let us know in more details.

As for:

It would also be great if the search params are case insensitive

If you’re speaking about the pathnames of files, they are case sensitive indeed and the only way to disable that is to convert all your pathnames to lowercase and ensure that your search prefixes are also lowercase.

Good luck, thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.