开发者

How to implement a more unique name (MVC)

开发者 https://www.devze.com 2023-03-30 19:36 出处:网络
I have a form to save images with a dynamic开发者_JAVA百科 number of downloadable images. How can I implement a more unique name for the images with minimal code (MVC)?

I have a form to save images with a dynamic开发者_JAVA百科 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
);


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

0

精彩评论

暂无评论...
验证码 换一张
取 消