Skip to content

Commit

Permalink
Simplified Asset Service to use Stream instead of FileStream for file…
Browse files Browse the repository at this point in the history
… uploading since only the Stream base type is used further (#104)

Co-authored-by: Vladimir Grigoriev <[email protected]>
  • Loading branch information
VGrigoriev1991 and Vladimir Grigoriev authored Oct 11, 2024
1 parent 0324ec6 commit 0b4872c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Bynder/Sdk/Service/Asset/AssetService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public async Task<SaveMediaResponse> UploadFileAsync(UploadQuery query)
/// <param name="fileStream">Check <see cref="IAssetService"/> for more information</param>
/// <param name="query">Check <see cref="IAssetService"/> for more information</param>
/// <returns>Check <see cref="IAssetService"/> for more information</returns>
public async Task<SaveMediaResponse> UploadFileAsync(FileStream fileStream, UploadQuery query)
public async Task<SaveMediaResponse> UploadFileAsync(Stream fileStream, UploadQuery query)
{
return await _uploader.UploadFileAsync(fileStream, query).ConfigureAwait(false);
}
Expand Down
2 changes: 1 addition & 1 deletion Bynder/Sdk/Service/Asset/IAssetService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public interface IAssetService
/// <exception cref="HttpRequestException">Can be thrown when requests to server can't be completed or HTTP code returned by server is an error</exception>
/// <exception cref="BynderUploadException">Can be thrown when upload does not finish within expected time</exception>

Task<SaveMediaResponse> UploadFileAsync(FileStream fileStream, UploadQuery query);
Task<SaveMediaResponse> UploadFileAsync(Stream fileStream, UploadQuery query);


/// <summary>
Expand Down

0 comments on commit 0b4872c

Please sign in to comment.