How to implement a more unique name (MVC)

I have a form for saving images with a dynamic number of uploaded images. How can I implement a more unique name for images with minimal code (MVC)?

filenameFile = String.Format( "I{0}I{1}P{2}[64x64]{3}", instance.Item.Id, instance.Id, Settings.PropertyPictureId, fileExtension ); 
+4
source share
1 answer

You can use Guid inside filename => it will be quite unique.

+11
source

Source: https://habr.com/ru/post/1369150/


All Articles