This question is locked. New answers and comments are not allowed.
Greetings,
I am having a problem now trying to save the contents from a RichTextBox.
In version 2011_3_116 I was able to successfully use the following code to pull the data stream from the richReport and save it to my database. It was then easy to load it back in. Now it seems the stream stops very early on and the transfer fails. Here is the code snippets that handle streaming it to my DB server:
It is a circuitous route that it takes, but the process works uploading files from other parts of the application, but now it hangs when trying to save the xaml.
Thanks for your help,
Mel
I am having a problem now trying to save the contents from a RichTextBox.
In version 2011_3_116 I was able to successfully use the following code to pull the data stream from the richReport and save it to my database. It was then easy to load it back in. Now it seems the stream stops very early on and the transfer fails. Here is the code snippets that handle streaming it to my DB server:
SaveRichReport_ReportName(theReportName, richReport.GetXamlFromDocument());...
if (theReport != null && theReport.CanRead) { UploadEntry upload = new UploadEntry(reportName + ".xaml", theReport); uploadsInFlight.Add(upload); Utils.UploadFile(upload); }...
public static void UploadFile(UploadEntry upload) { if (UploadStarted != null) { UploadStarted(upload); } }...
private void StartUpload(UploadEntry upload) { //compute file digest string file_digest = UploadManager.ComputeHash(upload.GetStream(), sha1); //create file bucket RESTSubmit createFile = new RESTSubmit(upload); createFile.RequestComplete += new RESTSubmit.RequestCompleteDelegate(createFile_RequestComplete); createFile.RequestError += new RESTSubmit.RequestErrorDelegate(createFile_RequestError); Stream tStr = upload.GetStream(); Dictionary<string, object> parameters = new Dictionary<string, object> { { "filename", upload.FileName }, { "file_digest", file_digest }, { "patient_id", upload.patient_id }, { "file_length", upload.Length.ToString() }, {"can_resume", "1"} }; createFile.Submit(Utils.BaseUri + @"file/create", parameters, RESTSubmit.Method.POST); }
It is a circuitous route that it takes, but the process works uploading files from other parts of the application, but now it hangs when trying to save the xaml.
Thanks for your help,
Mel