Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement a more unique name (MVC)

I have a form to save images with a dynamic number of downloadable images. How can I implement a more unique name for the images with minimal code (MVC)?

filenameFile = String.Format(
    "I{0}I{1}P{2}[64x64]{3}",
    instance.Item.Id,
    instance.Id,
    Settings.PropertyPictureId, fileExtension
);
like image 812
revolutionkpi Avatar asked Dec 21 '22 09:12

revolutionkpi


1 Answers

You could use a Guid inside the filename => it will be pretty unique.

like image 114
Darin Dimitrov Avatar answered Dec 24 '22 02:12

Darin Dimitrov