On Sat, Jan 26, 2013 at 9:01 PM, Saravanan P <
sarav...@shriramits.com> wrote:
> I dont think it will helpful, below is my code,
>
> // in my model
>
> content = File.read "#{Rails.root}/app/to/mytemplate.html.erb"
> template = ERB.new(content)
> html_content = template.result(binding)
> pdf= WickedPdf.new.pdf_from_string(html_content)
> save_path = "#{Rails.root}/public/test_pdf.pdf"
> File.open(save_path, 'wb') do |file|
> file << pdf
> end
> @photo = Photo.new
> @photo.avatar =
> File.open("#{Rails.root}/public/message#{@
message.id}.pdf")
> @photo.save
>
> The above code will generate pdf and store file locally then only i am
> uploading into s3 server.
> But i need to store s3 without store into local. Is that possible?