Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

StreamResult changes file name during download on Mobile phone

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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 "ABC.1.0.0.cab", 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].0.0.cab. (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 (ABC.1.0.0.cab), the file downloaded shows the correct name on download.

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

 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic