1

We have an android application written in Kotlin. It's our presentation layer. Most of the back-end is written in .NET Core. We have Azure Web services and Blob storage open. It's very simple to upload files from .NET Core to the Blob storage yet my question is how would one transfer them from the Kotlin app to the back-end? Currently we have Kotlin code setup to get photos from the phone's camera or gallery. We already can transfer such data as login information between the app and the back-end but how to do this with actual files? Are there any external libraries that could help us with that? There doesn't seem to be any mention of this in any of the documentations.

KapitaiN
  • 373
  • 1
  • 4
  • 14

2 Answers2

0

You can refer to this post for ideas. Here are my suggestions:

  1. Get the bitmap from assets(camera or gallery)
  2. Save bitmap to a file
  3. Upload File to Azure Blob Storage by RestApi
Jason Pan
  • 15,263
  • 1
  • 14
  • 29
0

You just can convert image to byte array and send it to the REST API.

At the back-end you can use something like SignalR to notify accepting of the image.