Ruby on Rails Wednesday, June 30, 2010

On 30 Jun 2010, at 18:13, Mamadou Touré wrote:

Unfortunately I have to hav each file on its own, I must not merge them 
in on single file. Is there a way to simulate several requests in order 
to loop through the array ?

Even if there were, the browser would not be able to understand it.  You 
could use several Ajax requests, but if I were your user, I'd be annoyed 
that your website was randomly downloading files without my consent. 
Why can't you just provide several download links for the files?  Or 
create a zip or tar archive?

So is there another way to merge my xdp file to my pdf without opening 
it in a browser (ie without using the send_file instruction) ? if so, 
this would solve my problem

Find a command line utility for your server OS that will do that for you:

Then just run the necessary command line instruction from your Rails app.

Best regards

Peter De Berdt

No comments:

Post a Comment