download without file type
Problem reported by Pavan Chaudhari - 6/23/2021 at 5:23 AM
Dear team,

as you shown in image ,we are trying to download the document  (Excel Doc.),
after click on download file was save as without document format (without extension)

version used   =  DocumentUltimate-v5.9.7.0

I tried code below  

  DocumentViewer DocViewer2 = new DocumentViewer();
                        DocViewer2.DocumentSource =  new DocumentSource(new DocumentInfo(Convert.ToString(docpath), docpath), databyte);
                        DocViewer2.DocumentFormat = GleamTech.DocumentUltimate.DocumentFormat.Xls;
                        DocViewer2.SidePaneVisible = false;
                        DocViewer2.DownloadFileName = Convert.ToString(uniqueId);

please guide me 
kindly revert as soon as possible 

Pavan Chaudhari

1 Reply

Reply to Thread
Cem Alacayir Replied
Employee Post Marked As Resolution
You should either specify a file name with extension for DocumentInfo:

DocViewer2.DocumentSource =  new DocumentSource(new DocumentInfo("uniqueId", "InputFile.xlsx"), databyte);

or you should set this property:

DocViewer2.DownloadFileName = "InputFile.xlsx";

Reply to Thread