How to download file by URL?

asked 2011-06-27 11:53:07 +0800

nmqhoan gravatar image nmqhoan

I will give a brief context: I'm writing an web application that the server will send to user email an URL to download file data which was stored in server. Every times user click the URL, the file data will be download automatically. How could I do that? It looks like java servlet? Is there any Zk demo for this?
Thanks in advance.

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2011-06-27 13:35:45 +0800

mjablonski gravatar image mjablonski
1284 3 5

For this use-case I would recommend to use a custom servlet.

Cheers, Maik

link publish delete flag offensive edit

answered 2011-06-28 00:48:19 +0800

woodyki gravatar image woodyki

Please check this method Desktop.getDownloadMediaURI(Media media, java.lang.String pathInfo) .

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2011-06-27 11:53:07 +0800

Seen: 161 times

Last updated: Jun 28 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More