LilGames
LilGames

Reputation: 126

How to list blob files with newest first in Azure Portal

I've Googled, searched Microsoft documents, etc and just can't find the answer to this:

In Azure's own Portal, when you go to Storage -> Container -> and view Blob files. Then click a specific blob file and then click Versions, the portal lists the versions of this file OLDEST first. I have to click "load more" over and over and over again to finally get to the most recent version!

So my question is HOW can I list a blob file's versions with NEWEST first, at the top?!

Upvotes: 3

Views: 7653

Answers (3)

April Papajohn
April Papajohn

Reputation: 479

It seems like it's not currently possible to change the sort order of the blobs when you view them in the portal. But you can do it in the Microsoft Azure Storage Explorer app. Just download it, login, select your subscription, then click "Explorer" to find the storage account. Then drill down to the container. You can sort in that view.

https://azure.microsoft.com/en-us/products/storage/storage-explorer/

Upvotes: 2

mmking
mmking

Reputation: 1577

You can use storage explorer in the portal. Go to the storage account, click "Storage Explorer (preview)" on the left menu, and click on "Last Modified" to sort.

Storage explorer in portal

One other alternative is to use the Storage Explorer desktop app: https://azure.microsoft.com/en-us/features/storage-explorer/

Upvotes: 1

Gaurav Mantri
Gaurav Mantri

Reputation: 136306

So my question is HOW can I list a blob file's versions with NEWEST first, at the top?!

Simple answer is that you can't. For blob versions, Azure Blob Storage always returns the blobs sorted by version id in ascending order. Considering version id is the date/time value when blob version was created, the oldest version is returned first. Furthermore Azure Blob Storage does not provide any server-side sorting feature.

If you are writing some code to fetch the blob versions, you will need to list all versions (taking continuation token into consideration) and sort it on the client side in descending order by version id in your code only.

Upvotes: 4

Related Questions