From 01b418d227328caa8f84a63c6f08d24fff3598d4 Mon Sep 17 00:00:00 2001 From: Mitchel Sellers Date: Tue, 29 Oct 2024 22:40:14 -0500 Subject: [PATCH 1/3] Updated downstream dependencies #56 --- .../AspNetCore.Utilities.CloudStorage.Tests.csproj | 10 +++++----- .../AspNetCore.Utilities.CloudStorage.csproj | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/AspNetCore.Utilities.CloudStorage.Tests/AspNetCore.Utilities.CloudStorage.Tests.csproj b/src/AspNetCore.Utilities.CloudStorage.Tests/AspNetCore.Utilities.CloudStorage.Tests.csproj index a9956fc..8863c86 100644 --- a/src/AspNetCore.Utilities.CloudStorage.Tests/AspNetCore.Utilities.CloudStorage.Tests.csproj +++ b/src/AspNetCore.Utilities.CloudStorage.Tests/AspNetCore.Utilities.CloudStorage.Tests.csproj @@ -15,14 +15,14 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/AspNetCore.Utilities.CloudStorage/AspNetCore.Utilities.CloudStorage.csproj b/src/AspNetCore.Utilities.CloudStorage/AspNetCore.Utilities.CloudStorage.csproj index b33d275..ad35ef0 100644 --- a/src/AspNetCore.Utilities.CloudStorage/AspNetCore.Utilities.CloudStorage.csproj +++ b/src/AspNetCore.Utilities.CloudStorage/AspNetCore.Utilities.CloudStorage.csproj @@ -4,7 +4,7 @@ ICG.AspNetCore.Utilities.CloudStorage AspNetCore Utilities CloudStorage A collection of utilities designed to aid in the storage of files to cloud storage locations. - Copyright 2021, IowaComputerGurus, Subject to the MIT License + Copyright 2024, IowaComputerGurus, Subject to the MIT License https://github.com/IowaComputerGurus/aspnetcore.utilities.cloudstorage aspnetcore;azure-storage;cloudstorage https://github.com/IowaComputerGurus/aspnetcore.utilities.cloudstorage @@ -37,10 +37,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive From 51452d800be45f9d5f25020291ba84f11000d369 Mon Sep 17 00:00:00 2001 From: Mitchel Sellers Date: Tue, 29 Oct 2024 22:44:09 -0500 Subject: [PATCH 2/3] Updated documentation --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2588802..58abd98 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This project provides a number of helpful wrappers around the Microsoft Azure St ## NuGet Status (ICG.AspNetCore.Utilities.CloudStorage) -![](https://img.shields.io/nuget/v/icg.aspnetcore.utilities.cloudstorage.svg) ![](https://img.shields.io/nuget/dt/icg.aspnetcore.utilities.cloudstorage.svg) | +![](https://img.shields.io/nuget/v/icg.aspnetcore.utilities.cloudstorage.svg) ![](https://img.shields.io/nuget/dt/icg.aspnetcore.utilities.cloudstorage.svg) ## SonarCloud Analysis @@ -46,7 +46,11 @@ Lastly, before using you will need to configure your storage options. An exampl } ``` -NOTE: Root client path could be https://youraccount.blob.core.windows.net or if you have configured a CDN your CDN path. This is what will be used to provide the return path of uploaded objects +> [!NOTE] +> Root client path could be https://youraccount.blob.core.windows.net or if you have configured a CDN your CDN path. This is what will be used to provide the return path of uploaded objects + +> [!WARNING] +> Be sure to consider security of these credentials, this library fully supports `IOptions` so you can utilize environment variables, the `appsettings.json` file or any other mechanism that injects values to Configuration ### Included Features From 8ea534481181a063175f457082662fdcad9a41ff Mon Sep 17 00:00:00 2001 From: Mitchel Sellers Date: Tue, 29 Oct 2024 23:04:10 -0500 Subject: [PATCH 3/3] Addressed an issue with token duration usage. --- .../AzureCloudStorageProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AspNetCore.Utilities.CloudStorage/AzureCloudStorageProvider.cs b/src/AspNetCore.Utilities.CloudStorage/AzureCloudStorageProvider.cs index a41f458..f238bd2 100644 --- a/src/AspNetCore.Utilities.CloudStorage/AzureCloudStorageProvider.cs +++ b/src/AspNetCore.Utilities.CloudStorage/AzureCloudStorageProvider.cs @@ -372,7 +372,7 @@ public string CreateSASUrl(string container, string objectName, int tokenDuratio BlobContainerName = container, BlobName = objectName, Resource = "b", - ExpiresOn = DateTimeOffset.UtcNow.AddHours(1) + ExpiresOn = DateTimeOffset.UtcNow.AddMinutes(tokenDuration) }; tokenBuilder.SetPermissions(BlobSasPermissions.Read); return blobClient.GenerateSasUri(tokenBuilder).ToString();