모르겠지만, 나는 이것이 내가 특정 송장을 다운로드하는 방식입니다 하나 개의 요청 만다운로드 배수 파일
에서 PDF 파일의 그룹을 다운로드하려면 :
def show
@invoice = Invoice.find_by_invoice_hash params[:hash]
respond_to do |format|
format.html
format.xml do
send_data File.read(@invoice.xml_path), type: 'text/xml', filename: "invoice_#{ @invoice.id }.xml", disposition: 'attachment'
end
format.pdf do
render :pdf => @invoice.hash,
layout: 'pdf',
footer: {
right: "printed at: #{Date.today}"
}
end
end
end
내가 무엇을 제안합니까?
파일 (zip/tar/etc ..)을 하나의 파일로 보관할 수 있습니다. – deefour