Skip to content

llenroc/Xamarin-Forms-Azure-Blob-Storage

 
 

Repository files navigation

Azure Storage

This sample demonstrates how to use Xamarin.Forms to store binary data in Azure Storage, and how to access the data.

also some sample code on using the xamarin pdf component from syncfusion

NOTE: Setting up syncfusion nuget packages in Visual Studio https://help.syncfusion.com/xamarin/introduction/download-and-installation#configuring-syncfusion-nuget-packages-in-visual-studio

Using the local storage emulator

  • Set the UWP project as startup. *NOTE: Android emulator connection to local storage emulator not currently working
  • Make sure to create containers "image-container" and "document-container" using the Azure Storage Explorer
  • Make sure the the storage emulator is started and running

In the App class of the shared lib:

  • Configure ICloudBlobStorageSettingsProvider to resolve to LocalBlobStorageSettingsProvider
  • RUN the UWP project

Using an ad-hoc generated SAS Token instead of a shared key

logo

  • Configure ICloudBlobStorageSettingsProvider to resolve to SasTokenBlobStorageSettings
  • Run the ASP dotnet core project in Development run configuration (which points to local emulator)*
  • Run the UWP Project *NOTE: currently local storage doesn't support https connections, which SAS Tokens require

Using Azure Storage

  • Setup an azure storage account with the 2 containers: "image-container" and "document-container"
  • Android App preferred (UWP app has some navigation issues)
  • Create a class "YourAzureStorageSettings" that returns CloudStorageSettings with ConnectionString that reflects the azure storage account
  • Alternatively update the appsettings.json file in the server project to get a SAS token from azure storage instead of the local emulator

Reference Links

Create Azure Storage Account

Azure Storage Emulator for local testing

Azure Storage in ASP NET CORE

Azure Storage: Using shared access signatures (SAS)

Xamain: Storing and Accessing Data in Azure Storage

About

Sample code for azure blob storage comms using Xamarin as a client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%