We are trying to form image name using below method and this method is called in for loop. We have used DateTime.UtcNow to append date time to image name.
However, our issue is for all images the same date time is getting appended, even though we have tried to use seconds and milliseconds to differentiate the image name.
As the same names are getting formed, while uploading the images, the images are getting replaced and only one image is uploaded.
Below is our code which is forming the image name.
public string FormImageName(string issuetype)
{
string fileName = issuetype +
"_" +
DateTime.UtcNow.ToString("yyyy-MM-dd hh:mm:ss:fff tt") +
".jpeg";
return fileName;
}
Any help on this appreacited !