File downloader action problem

emmexx 22 May, 2014
I have a problem with a form that I created to download some file.
In the form I don't put content, I only added an event and in the event I put the file downloader.

I use the form in a link in a page like the following:
<a href="index.php?option=com_chronoforms&chronoform=downloadFile&event=getFile" >Download file</a>

When I use that link the broser download dialog opens but the file (png or pdf or other formats) is reported as html content.
If I save the file, the content is truncated html code of a page of the site.

Is it wrong the way I'm trying to use this action or the problem is somewhere else?

Thank you
maxx
GreyHead 27 May, 2014
Hi maxx,

Why are you linking to a separate event? Can't you just use the File Downloader in the On Submit action of your form?

I don't really understand what you are trying to do here :-(

Bob
emmexx 28 May, 2014


Why are you linking to a separate event? Can't you just use the File Downloader in the On Submit action of your form?



Because the page where I want to publish the links is a popup and it'd be only a nuisance to the user to force her/him to submit.
Anyway why should the (missing) On Submit make any difference?
I call an event and that should be equivalent to calling On Submit.
What's the difference between the following?
http://.../myform&event=submit
http://.../myform&event=myevent

Thank you
maxx
Max_admin 02 Jun, 2014
Hi,

If you are receiving a full HTML file when you download then there must be a problem some where, the file downloader should purge all the output buffer and send you the file only then exit, so you should only get the file, please try again using a different file, and make sure the file exists and the path is correct, you may also a debugger after the downloader then check the downloaded HTML file which may contain some helpful error.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.