This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reading and displaying file of unknown type on the browser.

Kaustubh Patil
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to display a file from the server on to the browser. All I have the path of the file. The file may be anything, i.e. of any type.
I am reading the file in to bytestream array and writing that bytestream to the out stream of the response.
The problem here is that I cannot determine the content type of the response. As the file may be of any type i cannot hard-code the content type.
is there any way out of this ?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic