Basically I just want to be able to delete the file one it is
download. Any ideas?
On Mar 2, 11:25 am, elioncho
<elion...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello,
>
> I have an action on my controller named download which creates a tar
> file and then sends the file (via send_file) to the user. Its working
> but I will like to delete the file once it is sent. The tar file
> should be temporary and only available for download and then deleted
> from the server. Any idea on how to do this?
> Thanks,
>
> def download
> @app = App.find params[:id]
> system(''cd
''+$global_pa...-wBfZheUuDu0@public.gmane.org+'' && tar
-cf ''...@app.name+''.tar
> '')
> send_file $global_path+"#...@app.name}...@app.name}.tar"
> end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---