[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Feedback](/c/feedback/8)

# Improve the order of list vercel blob

87 views · 0 likes · 3 posts


Dohomi (@dohomi) · 2025-05-29

Hello

Currently the order of list blobs is random.

```
import { list } from "@vercel/blob";

// random order of blobs
const res = list() 
```

It would be way easier and straight forward if the order is created_at descending, could that not be implemented either by default or via prop?

Thanks for considering this as an improvement


Swarnava Sengupta (@swarnava) · 2025-05-29

Thanks for reaching out. I don't think this is possible right now so I have shared the feedback internally. Keep them coming! :)


Vincent Voyer (@vvoyer) · 2025-06-03

Thanks for the feedback @Dohomi! The ordering isn't actually random - Vercel Blob returns blobs sorted **lexicographically by pathname** (like dictionary order), which can appear random when filenames don't follow a predictable pattern.

Unfortunately, sorting by `uploadedAt` isn't possible at the storage level, so if you want that you need to work around this limitation.

**Workaround**: Include timestamps in your blob pathnames for chronological sorting:

```js

import { put } from "@vercel/blob";

// Include ISO timestamp for chronological order

const timestamp = new Date().toISOString(); // 2024-06-03T10:30:00.000Z

const blob = await put(`${timestamp}-filename.jpg`, file, { access: 'public' });

```

When you `list()` blobs with this naming pattern, they'll automatically sort chronologically (newest first if you want reverse order, manipulate the timestamp).

Alternatively, you can sort client-side after retrieval:

```js

const res = await list();

const sortedBlobs = res.blobs.sort((a, b) => new Date(b.uploadedAt) - new Date(a.uploadedAt));

```

Thanks!