-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Oleksii Anisenko
committed
Feb 28, 2024
1 parent
0c6eaf6
commit cf30c91
Showing
17 changed files
with
303 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
ManagedCode.Storage.IntegrationTests/TestApp/Controllers/FilesTestController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using ManagedCode.Communication; | ||
using ManagedCode.Storage.Core.Models; | ||
using ManagedCode.Storage.FileSystem; | ||
using ManagedCode.Storage.IntegrationTests.TestApp.Controllers.Base; | ||
using ManagedCode.Storage.Server; | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace ManagedCode.Storage.IntegrationTests.TestApp.Controllers; | ||
|
||
[Route("files")] | ||
[ApiController] | ||
public class FilesTestController(IFileSystemStorage storage) : BaseTestController<IFileSystemStorage>(storage) | ||
{ | ||
[HttpPost("upload")] | ||
public async Task<Result<BlobMetadata>> UploadToStream( | ||
[FromBody] Stream streamFile, | ||
[FromQuery] UploadOptions? options = null | ||
) | ||
{ | ||
return await Storage.UploadAsync(streamFile, options); | ||
} | ||
|
||
// [HttpPost("upload")] | ||
// public async Task<Result<BlobMetadata>> UploadToFile([FromBody] IFormFile file, | ||
// UploadOptions? options = null, | ||
// CancellationToken cancellationToken = default) | ||
// { | ||
// var f = await file.ToLocalFileAsync(); | ||
// return await Storage.UploadAsync(f.FileInfo, options, cancellationToken); | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.