the current code is working but the converted base64string output is attached to the api , but am having 404 error because the request url is too long. so i just need modification , to shorten the converted base64string. or any different approach.
var file = await CrossMedia.Current.PickPhotoAsync(new PickMediaOptions { PhotoSize = PhotoSize.Small });
byte[] imageArray = null;
if (file != null)
{
using (HttpClient client = new HttpClient())
using (MemoryStream ms = new MemoryStream())
{
var stream = file.GetStream();
stream.CopyTo(ms);
imageArray = ms.ToArray();
var base64String = Convert.ToBase64String(imageArray);