Azure blob storage - auto generate unique blob name

Emiswelt picture Emiswelt · Jan 14, 2013 · Viewed 7.5k times · Source

I am writing a small web application for Windows Azure, which should use the blob storage for, obviously, storing blobs.

Is there a function or a way to automatically generate a unique name for a blob on insert?

Answer

Sandrino Di Mattia picture Sandrino Di Mattia · Jan 14, 2013

You can use a Guid for that:

string blobName = Guid.NewGuid().ToString();