0

I am working on chat application how to upload and recieve image to azure blob with signalR. Is there any other service better then SignalR for image upload to blob

Parmendra
  • 115
  • 2
  • 12

1 Answers1

0

You could upload the image files to an azure blob container, then from the server side send the direct blob's URI to the clients. I'd recommend checking the following thread: SignalR chat application sending images

  • I am successfully send image to blob but now how i send the blob uri to client. – Parmendra Mar 29 '18 at 01:57
  • Refer to the following link:https://learn.microsoft.com/en-us/azure/storage/blobs/storage-custom-domain-name you can customize the blob uri – Adam Smith - Microsoft Azure Mar 29 '18 at 02:03
  • @Parmendra refer to this link https://learn.microsoft.com/en-us/azure/storage/blobs/storage-custom-domain-name it allows you to customize the blob name. Please upvote or mark as answer if answer was helpful to you. This would help future users looking for similar answers. Thanks – Adam Smith - Microsoft Azure Mar 29 '18 at 02:10
  • I have upload image to blob by: using (var memoryStream = new MemoryStream()) { activityIndicator.IsRunning = true; file.GetStream().CopyTo(memoryStream); file.Dispose(); // return memoryStream.ToArray(); uploadedFilename = await AzureStorage.UploadFileAsync(ContainerType.Image, new MemoryStream(memoryStream.ToArray())); activityIndicator.IsRunning = false; } – Parmendra Mar 29 '18 at 04:33
  • Recieved: var imageData = await AzureStorage.GetFileAsync(ContainerType.Image, uploadedFilename);var img = ImageSource.FromStream(() => new MemoryStream(imageData)); – Parmendra Mar 29 '18 at 04:35