Compare commits
	
		
			2 Commits
		
	
	
		
			dev-sergio
			...
			2384117c79
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 2384117c79 | |||
| daa9699bdd | 
| @@ -11,6 +11,7 @@ namespace Core.Blueprint.DAL.API.Controllers | ||||
|     [Produces("application/json")] | ||||
|     [ApiController] | ||||
|     [AllowAnonymous] | ||||
|     //test gitea | ||||
|     public class BlobStorageController(IBlobStorageService storageService) : ControllerBase | ||||
|     { | ||||
|         [HttpPost("UploadBlobFromFileBrowser")] | ||||
|   | ||||
| @@ -40,7 +40,7 @@ builder.Services.AddProblemDetails(); | ||||
| builder.Services.AddMemoryCache(); | ||||
| builder.Services.AddLogs(builder); | ||||
| builder.Services.AddKeyVault(builder.Configuration); | ||||
| //builder.Services.AddBlobStorage(builder.Configuration); | ||||
| builder.Services.AddBlobStorage(builder.Configuration); | ||||
| //builder.Services.AddRedis(builder.Configuration); | ||||
| //builder.Services.AddMongoLayer(builder.Configuration); | ||||
| //builder.Services.AddSQLServer(builder.Configuration); | ||||
|   | ||||
| @@ -12,5 +12,17 @@ | ||||
|     "Address": "http://localhost:8200", | ||||
|     "Token": "hvs.kDZnAfrvfcMNrom6RmlEhZ7I", | ||||
|     "SecretMount": "secret" | ||||
|   }, | ||||
|   "ConnectionStrings": { | ||||
|     "BlobStorage": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" | ||||
|   }, | ||||
|   "BlobStorage": { | ||||
|     "ContainerName": "blueprint", | ||||
|     "AccountName": "devstoreaccount1", | ||||
|     "AccountKey": "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" | ||||
|   }, | ||||
|   "ServiceSettings": { | ||||
|     "ApplicationName": "blueprint", | ||||
|     "LayerName": "dal" | ||||
|   } | ||||
| } | ||||
| @@ -10,7 +10,7 @@ namespace Core.Blueprint.DAL.Storage.Contracts | ||||
|         Task<IEnumerable<BlobFileAdapter>> GetBlobsListAsync(string? prefix); | ||||
|         Task<Response<BlobContentInfo>> UploadBlobAsync(string blobName, Stream content); | ||||
|         Task<BlobFileAdapter> UploadBlobAsync(BlobAddDto newBlob); | ||||
|         BlobDownloadUriAdapter DownloadBlobAsync(string blobName); | ||||
|         ValueTask<BlobDownloadUriAdapter> DownloadBlobAsync(string blobName); | ||||
|         Task<BlobFileAdapter?> DeleteBlobAsync(string fileName); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -11,7 +11,7 @@ | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="Blueprint.Storage" Version="0.0.1" /> | ||||
|     <PackageReference Include="Blueprint.Storage" Version="0.0.3" /> | ||||
|   </ItemGroup> | ||||
|  | ||||
| </Project> | ||||
|   | ||||
| @@ -27,9 +27,9 @@ namespace Core.Blueprint.DAL.Storage.Service | ||||
|             return await blobStorageProvider.ListBlobsAsync(prefix); | ||||
|         } | ||||
|  | ||||
|         public BlobDownloadUriAdapter DownloadBlobAsync(string blobName) | ||||
|         public async ValueTask<BlobDownloadUriAdapter> DownloadBlobAsync(string blobName) | ||||
|         { | ||||
|             var result = blobStorageProvider.GenerateBlobDownloadUri(blobName); | ||||
|             var result = await blobStorageProvider.GenerateBlobDownloadUri(blobName); | ||||
|             return result; | ||||
|         } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user