mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Fix file name sanitization in PDF previewer [SCI-5541]
This commit is contained in:
parent
a6b2b23800
commit
fab013b19b
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ class PdfPreviewJob < ApplicationJob
|
||||||
|
|
||||||
ActiveRecord::Base.transaction do
|
ActiveRecord::Base.transaction do
|
||||||
success = system(
|
success = system(
|
||||||
"#{libreoffice_path} --headless --invisible --convert-to pdf --outdir #{work_dir} #{input.path}"
|
libreoffice_path, '--headless', '--invisible', '--convert-to', 'pdf', '--outdir', work_dir, input.path
|
||||||
)
|
)
|
||||||
unless success && File.file?(preview_file)
|
unless success && File.file?(preview_file)
|
||||||
raise StandardError, "There was an error generating PDF preview, blob id: #{blob.id}"
|
raise StandardError, "There was an error generating PDF preview, blob id: #{blob.id}"
|
||||||
|
|
Loading…
Reference in a new issue