Hello Everyone, I have one model called Message. User can send messages along with 2 more images. I need to take a pdf of each message and store it in amazon s3 for daily basses. I need to show that .pdf (one message) file for admin to download that pdf. I am using wicked_pdf gem to generate pdf and whenever gem for cron task. I can generate pdf file in browser by "generate_pdf" action. but I dont know how to get pdf and store that amazon using cron. Please help!
on 2013-01-05 11:45
on 2013-01-05 11:52
Next time, please read the documentation before asking a question. https://github.com/mileszs/wicked_pdf#super-advanced-usage Save it to a file like shown above ^^ Then use the official aws-s3 gem to upload the file. http://amazon.rubyforge.org/ Write a class or a rake task which does the above, then use whenever to schedule it every day. https://github.com/javan/whenever#example-schedulerb-file -- Dheeraj Kumar
on 2013-01-05 15:39
Hi Dheeraj Actually i already saw that.. but i didn't knew how to use. But now i got it by trying trying and facing error and correct myself. Now i coded rake task to automatically upload each messages as pdf into amazon s3. :) Thanks for the reply, happy weekend. On Sat, Jan 5, 2013 at 4:20 PM, Dheeraj Kumar <email@example.com>wrote: > Write a class or a rake task which does the above, then use whenever to > > I dont know how to get pdf and store that amazon using cron. > https://groups.google.com/d/msg/rubyonrails-talk/-.... > firstname.lastname@example.org. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Regards by Saravanan.P