Skip to content

Commit

Permalink
Removed workaround to duplicate upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
janstaelensskyline committed Jan 22, 2025
1 parent 8dec584 commit e8a25b6
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,8 @@ public async Task<ArtifactUploadResult> UploadVersionAsync(byte[] package, strin
if (response.IsSuccessStatusCode)
{
_logger.LogDebug($"The version upload api returned a {response.StatusCode} response. Body: {body}");

// Problem, Deployer cannot handle the new flow of catalog upload. So we will use the 'old' upload again. Return that Identifier.
CatalogMetaData meta = new CatalogMetaData() { Name = fileName, Version = new CatalogVersionMetaData() { Value = version } };
return await VolatileArtifactUploadAsync(package, key, meta, cancellationToken);

//var returnedResult = JsonConvert.DeserializeObject<CatalogUploadResult>(await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false));
//return new ArtifactUploadResult() { ArtifactId = returnedResult.AzureStorageId };
var returnedResult = JsonConvert.DeserializeObject<CatalogUploadResult>(await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false));
return new ArtifactUploadResult() { ArtifactId = returnedResult.AzureStorageId };
}

_logger.LogError($"The version upload api returned a {response.StatusCode} response. Body: {body}");
Expand Down

0 comments on commit e8a25b6

Please sign in to comment.