Basically I just want to be able to delete the file one it is
download. Any ideas?

On Mar 2, 11:25 am, elioncho <[email protected]> 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 '[email protected]+' && tar -cf '[email protected]+'.tar
> ')
>   send_file $global_path+"#[email protected]}[email protected]}.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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to