@@ -237,6 +237,8 @@ private async Task<ActionResult> UploadSymbolsPackageInternal(SubmitPackageReque
237237
238238 var verifyRequest = new VerifyPackageRequest ( packageMetadata , accountsAllowedOnBehalfOf , existingPackageRegistration ) ;
239239 verifyRequest . IsSymbolsPackage = true ;
240+ verifyRequest . HasExistingAvailableSymbols = packageForUploadingSymbols . IsLatestSymbolPackageAvailable ( ) ;
241+
240242 model . InProgressUpload = verifyRequest ;
241243
242244 return View ( model ) ;
@@ -386,7 +388,12 @@ private async Task<JsonResult> UploadSymbolsPackageInternal(PackageArchiveReader
386388 // Save the uploaded file
387389 await _uploadFileService . SaveUploadFileAsync ( currentUser . Key , uploadStream ) ;
388390
389- return await GetVerifyPackageView ( currentUser , packageMetadata , accountsAllowedOnBehalfOf , existingPackageRegistration , isSymbolsPackageUpload : true ) ;
391+ return await GetVerifyPackageView ( currentUser ,
392+ packageMetadata ,
393+ accountsAllowedOnBehalfOf ,
394+ existingPackageRegistration ,
395+ isSymbolsPackageUpload : true ,
396+ hasExistingSymbolsPackageAvailable : packageForUploadingSymbols . IsLatestSymbolPackageAvailable ( ) ) ;
390397 }
391398
392399 private async Task < JsonResult > UploadPackageInternal ( PackageArchiveReader packageArchiveReader , Stream uploadStream , NuspecReader nuspec , PackageMetadata packageMetadata )
@@ -495,14 +502,22 @@ await _packageDeleteService.HardDeletePackagesAsync(
495502
496503 await _uploadFileService . SaveUploadFileAsync ( currentUser . Key , uploadStream ) ;
497504
498- return await GetVerifyPackageView ( currentUser , packageMetadata , accountsAllowedOnBehalfOf , existingPackageRegistration , isSymbolsPackageUpload : false ) ;
505+ var hasExistingSymbolsPackageAvailable = existingPackage != null && existingPackage . IsLatestSymbolPackageAvailable ( ) ;
506+
507+ return await GetVerifyPackageView ( currentUser ,
508+ packageMetadata ,
509+ accountsAllowedOnBehalfOf ,
510+ existingPackageRegistration ,
511+ isSymbolsPackageUpload : false ,
512+ hasExistingSymbolsPackageAvailable : hasExistingSymbolsPackageAvailable ) ;
499513 }
500514
501515 private async Task < JsonResult > GetVerifyPackageView ( User currentUser ,
502516 PackageMetadata packageMetadata ,
503517 IEnumerable < User > accountsAllowedOnBehalfOf ,
504518 PackageRegistration existingPackageRegistration ,
505- bool isSymbolsPackageUpload )
519+ bool isSymbolsPackageUpload ,
520+ bool hasExistingSymbolsPackageAvailable )
506521 {
507522 IReadOnlyList < string > warnings = new List < string > ( ) ;
508523 using ( Stream uploadedFile = await _uploadFileService . GetUploadFileAsync ( currentUser . Key ) )
@@ -546,8 +561,8 @@ private async Task<JsonResult> GetVerifyPackageView(User currentUser,
546561
547562 var model = new VerifyPackageRequest ( packageMetadata , accountsAllowedOnBehalfOf , existingPackageRegistration ) ;
548563 model . IsSymbolsPackage = isSymbolsPackageUpload ;
564+ model . HasExistingAvailableSymbols = hasExistingSymbolsPackageAvailable ;
549565 model . Warnings . AddRange ( warnings ) ;
550-
551566 return Json ( model ) ;
552567 }
553568
0 commit comments