aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-01-17 15:26:43 +0000
committerRobin Houston <robin.houston@gmail.com>2012-01-17 15:26:43 +0000
commit8f6049f5650e92e30d79845655405bae347e6715 (patch)
treea4b749705ff252fcf4a88eb26ef18bbd40bc76ef
parent3bb07659f8185cf8ba58c5d4766321f23ce3a9f1 (diff)
Use AlaveteliExternalCommand for unrtf
-rw-r--r--app/models/foi_attachment.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb
index 6cad0ed01..74346227b 100644
--- a/app/models/foi_attachment.rb
+++ b/app/models/foi_attachment.rb
@@ -314,9 +314,7 @@ class FoiAttachment < ActiveRecord::Base
if self.content_type == 'application/pdf'
html = AlaveteliExternalCommand.run("pdftohtml", "-nodrm", "-zoom", "1.0", "-stdout", "-enc", "UTF-8", "-noframes", tempfile.path)
elsif self.content_type == 'application/rtf'
- IO.popen("/usr/bin/unrtf --html " + tempfile.path + "", "r") do |child|
- html = child.read()
- end
+ html = AlaveteliExternalCommand.run("unrtf", "--html", tempfile.path)
elsif self.has_google_docs_viewer?
html = '' # force error and using Google docs viewer
else