Hello
I have a file on the server and i want it to be downloadable by users
when they press on a link. i tried send_date, but it created a new
file instead of grabbing the existing one.
Here is the code
Hello
I have a file on the server and i want it to be downloadable by users
when they press on a link. i tried send_date, but it created a new
file instead of grabbing the existing one.
Here is the code
Hello
It's Rails
here is the view code:
<%= link_to "Download", { :action => "download" } , :post => true
%>
as i said in my previous thread, the file is already in the server; no
need to create, just download it. but i got a new file created
instead, with nothing in it.
Thank youg
···
On Jun 4, 1:26 pm, Phillip Gawlowski <cmdjackr...@googlemail.com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Fredy wrote:
> Hello
> I have a file on the server and i want it to be downloadable by users
> when they press on a link. i tried send_date, but it created a new
> file instead of grabbing the existing one.
> Here is the code
>
> def download
> send_data( path=>"public/files/test.doc" , :filename => "test.doc",
> :type => "text/doc", :disposition => "attachment")
> end
>
> any help will be appreciated
Is this Rails, Merb, or...?
Anyway, if it is a framework, you might be better off asking the
community around the framework for hints and help.
Anyway, if you are using Rails you could use link_to, for example, as
described here:
as i said in my previous thread, the file is already in the server; no
need to create, just download it. but i got a new file created
instead, with nothing in it.
Have you looked at the link I mentioned? It solves the exact problem you
have.
ZOOT: I'm afraid our life must seem very dull and quiet compared to
yours. We are but eightscore young blondes, all between sixteen and
nineteen-and-a-half, cut off in this castle, with no one to protect us.
Oooh. It is a lonely life ... bathing ... dressing ... undressing ...
making exciting underwear....
~ -- Monty Python and the Holy Grail