• Post Reply Bookmark Topic Watch Topic
  • New Topic

File Download Issue  RSS feed

 
Mike London
Ranch Hand
Posts: 1340
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a Web site that lets the users download files, is there a slick way to say create a temporary file on the fly and send it directly to a URL.

Say I'm connected to siteX. I click a link to download a file. The file is generated by code that's running on the server.

What I'm asking is whether there's a way to "create" the file so the user can download it, but not actually create a file on the server (files on the server will accumulate).

Something like a temp file that gets associated with a download action.

Look forward to any ideas.

Thanks.

-- Mike
 
Mike London
Ranch Hand
Posts: 1340
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ben,

Thanks for your comment.

The file type in question, however, is a regular Text file.

Can I download that too without having to create a physical file on the server?

Thanks again!!!

- Mike
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Same technique. Stream the data from a servlet being sure to set the appropriate headers.
 
Mike London
Ranch Hand
Posts: 1340
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!