Azure Image Gallery
An image gallery with file hosting on Azure Blob Storage
See a demo of the application at the following link: AzureImageGallery
Currently offline to find a new hosting site.
This is a full stack application using C#/ASP.Net Core as an image gallery that uploads and reads files to an Azure blob storage container. Images have full create, edit, and delete functionality.
A SQL database reads an Uri to the actual file in the container of the storage service and serves it via web view, thus reducing space (and cost) needed in a relational database.
Azure-Image-Gallery is an N-tier project that contains three major project layers:
AzureImageGallery.Web
.AzureImageGallery.Data
.AzureImageGallery.Services
directory.In order to use this application:
~$ git clone https://github.com/johnmcraig/azure-image-gallery
Then, gather any missing NuGet packages and restore the project files using the DotNet command dotnet restore
(or Build in Visual Studio).
Afterwards, you will need to have an Azure account that has a Blob Storage service. Get the connection string from the account info under Access Keys, then pass them in the User Secrets or Application settings JSON file as:
{ "AzureStorageConnectionString": "YourActualKey" }
.
Additionally, if you do not have an appsettings.json
file, you will need to create one.
Make sure you use either Visual Studio Secret Manager or the dotnet
command line to add the above JSON object (from point #3.) so the CloudStorage class and methods can connect using that string.
Upon initial startup of the application, if it is currently in development mode, a Sqlite database will be created and a few images will be seeded into the database for testing purposes.