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 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 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();