'Uploading Image files from Xamarin App to Gallery and Azure

I am working on a development (Android, IOS) that requires uploading Images files to an Azure Storage, this images can be taken from the gallery or with the device's camera.

For this I have implemented the following:

-Image Capture (I'm using Xamarin.Essentials.CapturePhotoAsync()) (Solved) -Images from Gallery (I'm using Xamarin.Essentials.PickPhotoAsync()) (Solved)

Both actions are stored in a List that will finally uploaded to the azure storage.

First question: Is this the best "approach" to upload files to storage? Is there a better practice than storing all this information in a list and finally uploading it?

In addition to this, I have a new requirement and that is that the captured images can be stored in the device's gallery. Hence my second question....

Which is the best way to get it to work on both Android and IOS? Tried some methods, but not everything works properly...

The libraries that can possibly solve this are a bit outdated or don't work in all cases....

(Xam.Plugin.Media) Have some issues on resent Android devices (Xamarin.MediaGallery) works great on Android but on IOS it's another story 😕 Dependency Services: it is the most successful and a different angle than nugets but... it currently has some things deprecated like storage routes in Android for save in Gallery....

I would appreciate your recommendations.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source