I have group of streams in public/data folder. Here i want to download the any selected stream from datafolder.
I have tried to download using 'send_data' in my show method of controller like below:
send_data(@stream.location,:filename => @stream.name,:disposition => 'download')
i have hyperlink called show ,if i press the link it is opening the file with stream as content. ex:i have cmd.txt in data folder,once i press the link it open cmd.txt as a file and in that file it will have filename itself.
here i want to download the actual file.
can any one suggest how to do download from any location and is is possible to download with send_data?