0

Filedownload.save and IE security blocking

asked 2010-11-12 03:45:29 +0800

xmedeko gravatar image xmedeko
1031 1 16
http://xmedeko.blogspot.c...

updated 2010-11-12 05:37:53 +0800

Hi,
if I use Filedownload.save(media) in the IE, the user has to "grant permit to a popup", then the page is reloaded, so the user has to click to a button once more and then is able to download the media. I know the user may tweak the security settings in the IE to avoid this. But I would like to find a solution, which works in the IE without any hassle.

I am thinking about making a HTML ref <a href="...." /> which would point to a servlet. And the servlet would deliver the content. However, I have a feeling, that this mechanism is already implemented in ZK as org.zkoss.zk.ui.ext.render.DynamicMedia. Is is right? If so, should I just implement DynamicMedia into the Toolbarbutton ExtraCtrl (I use ZK 3.6) and it should work? May be a problem to set Content-disposition?

Thanks for any advice
Andy

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2010-11-14 18:41:18 +0800

samchuang gravatar image samchuang
4084 4

Hi

From the javadoc, it looks like a solution, I have to try, I am wondering, are there anyone already figure it out ?

link publish delete flag offensive edit

answered 2010-11-18 20:29:22 +0800

samchuang gravatar image samchuang
4084 4

updated 2010-11-18 20:31:36 +0800

Hi

after I trace code, I found you may need to use AuExtension, it allow you to process a request, which is the url in <a href="...." />

but I don't know if you can stop IE's block behavior, IE seems to block when try to download file from web site ?, if IE try to block this behavior, it seems no way to prevent it from happening?

are there anyone know how IE works ?

link publish delete flag offensive edit

answered 2010-11-19 02:43:34 +0800

xmedeko gravatar image xmedeko
1031 1 16
http://xmedeko.blogspot.c...

Hi samchuang,
unfortunately, AuExtension is "Since: 5.0.0", and I use ZK 3.6.5.

Yes, the IE user has either click "a warning bar at the top " to allow the download or change the security settings of IE. It has been already discussed, see:
- http://zh.zkoss.org/forum/listComment/7162
- http://www.zkoss.org/forum/listComment/10490

link publish delete flag offensive edit

answered 2010-11-21 19:08:51 +0800

samchuang gravatar image samchuang
4084 4

Hi

from the thread you provide, seems no other way to prevent it.

link publish delete flag offensive edit

answered 2010-12-30 00:19:09 +0800

rohitwadke gravatar image rohitwadke
339 1 5

Hello All,
I had successfully implemented the download functionality in my application. But the problem is in my downloaded file name. Suppose I have file to be downloaded from server has name "abc.txt" then its downloaded name is also same like but when the filename is like "new abc.txt" then downloaded file name is get changed to "new+abc.txt".

It should be "new abc.txt". Please help me.....Thank you in advance.

link publish delete flag offensive edit

answered 2011-01-02 22:56:45 +0800

samchuang gravatar image samchuang
4084 4

Hi

maybe you set file name as "new xxx" inside code ??

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

Follow

RSS

Stats

Asked: 2010-11-12 03:45:29 +0800

Seen: 1,315 times

Last updated: Jan 02 '11

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