While drag and drop of an image i need to convert BitmapImage into StorageFile to upload it.
DataPackageView dataPackageView = Clipboard.GetContent();
if (dataPackageView.Contains(StandardDataFormats.Bitmap))
{
RandomAccessStreamReference img = await dataPackageView.GetBitmapAsync();
var imgstream = await img.OpenReadAsync();
BitmapImage bitmap = new BitmapImage();
bitmap.SetSource(imgstream);
StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri(bitmap.UriSource.ToString()));
IUploadFileModel _uploadModel = ObjFactory.Instance.CreateUploadFileModel();
_uploadModel.UploadFileAsync(file, user, OpenChatData.TeamID.ToString(), _isReadReceiptEnabled);
}
laxmi