How to Upload image from galley to parse in android

SaggySaggy USMember
edited May 2015 in Xamarin.Android

HI Guys,

Anybody have idea to save the image captured from camera or img selected from gallery to parse in android..?
i am aware of saving the file but , dont know how to save the image on parse.

Answers

  • HarpreetSagguHarpreetSaggu USMember

    Hi Sagar

    I am able to do this with the help of following code:-

    img.Source = ImageSource.FromStream (() => {
    var mem=new MemoryStream();
    imgstream=file.GetStream();
    //byte[] b = file.Path;

                var path=file.Path;
    
                byte[] b = System.IO.File.ReadAllBytes(path);
    
                Parsefile imgfile = new ParseFile("Wine", b);
    
    
    
                return imgstream;
    
            });
    

    Save the imgFile .
    :)

Sign In or Register to comment.