This is a migrated thread and some comments may be shown as answers.

IsolatedStorage File Upload

4 Answers 52 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Park
Top achievements
Rank 1
Park asked on 28 Mar 2011, 04:25 AM
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

4 Answers, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 30 Mar 2011, 03:51 PM
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
0
Park
Top achievements
Rank 1
answered on 31 Mar 2011, 01:29 AM
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
0
hwsoderlund
Top achievements
Rank 1
answered on 31 Mar 2011, 01:16 PM
@Park
I just want to point you to the feature request in PITS with ID 5247. Please vote for it.
0
Park
Top achievements
Rank 1
answered on 04 Apr 2011, 08:51 AM
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.

Tags
Upload
Asked by
Park
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Park
Top achievements
Rank 1
hwsoderlund
Top achievements
Rank 1
Share this question
or