I am using Aspose Words on a project currently, and am utilizing the Save overload that accepts a HttpResponse object and outputs the document to the response for the client to save or download. One of the parameters is the FileName, as expected, and I have found that I cannot pass a filename that includes a Period and spaces in it that where the period does not denote the file extension. The returned name from the Save method (save/open file dialog in browser) shows the name ending at the first period, as if the rest of the filename were the extension.
To sample this, simply load any document and call
wordDoc.Save(HttpContext.Current.Response, "This.is a test.docx", ContentDisposition.Attachment, null);
The Save/Open dialog in the browser will display “This.is” as the filename.
If you then change the filename to “This.is+a+test.docx” the Save/Open dialog in the browser will display “This.is+a+test.docx” as the filename, as you expect.
Has this been encountered by anyone else, and if so, was there a workaround utilized for it? Currently, my only option to preserve most of the filename is to use Uri.EscapeDataString to encode the filename.