Skip to content

Commit

Permalink
Bugfix for GenerateUploadId()
Browse files Browse the repository at this point in the history
  • Loading branch information
ramtinak committed Aug 23, 2024
1 parent eef54eb commit f3a8c83
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ internal static string GenerateDeviceId()
internal static string GenerateUploadId()
{
var timeSpan = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0);
var uploadId = (long) timeSpan.TotalSeconds;
var u = (uploadId * ExtensionHelper.Rnd.Next(1111, 99999)) - ExtensionHelper.Rnd.Next(1000, 99999);
return $"{u}{ExtensionHelper.Rnd.Next(33333, 9999999)}";
var min = (int) timeSpan.TotalSeconds;
return ExtensionHelper.Rnd.Next(min, int.MaxValue).ToString();
}
//internal static string GenerateRandomUploadIdOLD()
//{
Expand Down

0 comments on commit f3a8c83

Please sign in to comment.