IsolatedStorage File Upload

5 posts, 0 answers
  1. Park
    Park avatar
    39 posts
    Member since:
    Sep 2010

    Posted 27 Mar 2011 Link to this post

    Hi~

    I making WebCam Image to Server Upload
    I try to Upload part using Rad Upload Control only

    Process
    View WebCam -> Capture -> Send Image -> End

    But, i can't direct IsolatedStorage file access

    this is my source

            _isf = IsolatedStorageFile.GetUserStoreForApplication();

            void _capture_CaptureImageCompleted(object sender, CaptureImageCompletedEventArgs e)
            {
                //이미지 저장이 완료되면 여기로
                WriteableBitmap wb = e.Result;
                //화면에 촬영된 이미지 보여주기
                if (_capture != null)
                {
                    _capture.Stop();
                    ImageBrush image = new ImageBrush();
                    image.ImageSource = wb;
                    rectVideo.Fill = image;
                }

                string name = Guid.NewGuid().ToString() + ".jpg";
                using (IsolatedStorageFileStream isfs = new IsolatedStorageFileStream(name, FileMode.CreateNew, _isf))
                {
                    MemoryStream stream = new MemoryStream();
                    //IDAppPublic에 있는 확장메소드 사용
                    wb.EncodeJpeg(stream);
                    stream.CopyTo(isfs);
                    isfs.Close();

                    //저장완료 후 서버에 올리고 화면닫고 사진찍은거 보여주고
                    if (RadUpload1 != null)
                    {
                        //how can i do add isfs to RadUpload1 control?
                    }
                }
            }

    thank you

  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 30 Mar 2011 Link to this post

    Hello Park,

    The RadUpload is not designed to work directly with the stream.
    You would have to add a file that the RadUpload can process and upload.

    Best wishes,
    Alex Fidanov
    the Telerik team
  3. DevCraft banner
  4. Park
    Park avatar
    39 posts
    Member since:
    Sep 2010

    Posted 30 Mar 2011 Link to this post

    hii admin

    You would have to add a file that the RadUpload can process and upload
    -> ok. i want to add a file that RadUpload
    hmm.. i try save a image file , and add it..

    thank you
  5. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 31 Mar 2011 Link to this post

    @Park
    I just want to point you to the feature request in PITS with ID 5247. Please vote for it.
  6. Park
    Park avatar
    39 posts
    Member since:
    Sep 2010

    Posted 04 Apr 2011 Link to this post

    Hi~ all

    I solve it.

    hehehehehehehehe

    i don't save IsolatedStorageFile,

    my image -> MemoryStream -> trans to server for WCF Domain Service -> Server side save file

    IsolatedStorageFileI is i can't read RootPath, if not trust app.

    so, i change other way,  save to server is it

    i ref uri
    http://community.infragistics.com/blogs/anton_staykov/archive/2010/04/28/implementing-simple-file-upload-using-silverlight-4-drag-amp-drop-feature-and-infragistics-compression-library.aspx

    thank you all.

Back to Top
DevCraft banner