C
C#2y ago
aaarianme

❔ Saving Images to the database on azure

For my web app i need to save images. my app is hosted on azure back end is asp.net core. when an image gets uploaded should i cast to to base64 and save it on mysql azure database or should i save the actual image on azure and save the path to reference it? where on azure would i be able to store it?
7 Replies
Angius
Angius2y ago
Save the image in some blob storage and only save the path in the db Azure should offer blob storage
aaarianme
aaarianme2y ago
how would i access the blob storage? is it just like a db with con string
Angius
Angius2y ago
It usually has some API that lets you send files, deletion requests, etc
Angius
Angius2y ago
Azure Blob Storage | Microsoft Azure
Azure Blob storage provides scalable, cost-efficient object storage in the cloud. Store and access unstructured data for your most demanding workloads.
Angius
Angius2y ago
Or just use an existing library that does all the calls for you: https://learn.microsoft.com/en-us/dotnet/api/overview/azure/storage?view=azure-dotnet
Azure Storage SDK for .NET - Azure for .NET Developers
Reference for Azure Storage SDK for .NET
Angius
Angius2y ago
GitHub
azure-sdk-for-net/sdk/storage/Azure.Storage.Blobs at main · Azure/a...
This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/dotnet/azure/ or our vers...
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.