1
Load Document from Byte array does display in browser. No XPZ file created.
Question asked by Christian O'Reilly - 10/3/2017 at 1:15 PM
Unanswered
Please help.  I have scanned the knowledge base and community for a solution, but I could not find the problem. 
 
Trying to load a document from a byte array stored in a SQL Server database:
 
Note:  file object contains the unique id, file name with format, and the byte array
 
 
var file = FilesController.GetFile(Convert.ToInt32(e.Node.Value));
if (file.FileData.Length > 0)
{
    documentViewer.Visible = true;
    documentViewer.DocumentSource = new DocumentSource(
        new DocumentInfo(file.FileId.ToString(), file.FileName, DocumentFormat.Pdf), file.FileData);
}
 
Upon load the following is created in the cache:  Shouldn’t there be an XPZ file created as well?
 
Folder:  ~Doc1.pdf~1er6pbm
  • ~1er6pbm~.pdf
  • ~1er6pbm~l8ognb.json
 
File does not display in browser.  No exception messages are thrown. 
 
Note:  ~1er6pbm~.pdf opens a valid PDF.

1 Reply

Reply to Thread
0
Christian O'Reilly Replied
Problem was caused by ASP.NET Update Panel.  When I removed the controls from the panel it worked fine.

Reply to Thread