public async void ContinueFileOpenPicker(IReadOnlyList<StorageFile> files) { if (files == null || !files.Any()) return; IsLoading = true; using (var stream = (FileRandomAccessStream)await files[0].OpenAsync(FileAccessMode.Read)) { var newImageBytes = new byte[stream.Size]; using (var dataReader = new DataReader(stream)) { await dataReader.LoadAsync((uint)stream.Size); dataReader.ReadBytes(newImageBytes); } var contentHelper = new ContentClientHelper(QuickbloxClient); var blobUploadInfo = await contentHelper.UploadImage(newImageBytes, false); if (blobUploadInfo != null) { SendAttachment(blobUploadInfo); } } IsLoading = false; }