Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

StreamResult changes file name during download on Mobile phone  RSS feed

Kash reily
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm using Struts2 StreamResult to download a file to mobile phones as follows:

I set all the required parameters in my Action class. The content-disposition is set as follows:

If I assign binName to a string such as "", the downloaded file name displays correctly when downloaded to a desktop.
But on a mobile phone (Windows Mobile to be specific), the name is displayed as "ABC.1[1] (There is no existing file on the device which has this filename). If I redirect to a url which points to the file to be downloaded (, the file downloaded shows the correct name on download.

Any idea on why the downloaded file name changes if I use result type="stream"?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!