mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 21:21:50 +08:00
Merge pull request #3267 from okriuchykhin/ok_SCI_5541_v2
Fix file name sanitization in PDF previewer [SCI-5541]
This commit is contained in:
commit
2b96d59d74
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ class PdfPreviewJob < ApplicationJob
|
|||
|
||||
ActiveRecord::Base.transaction do
|
||||
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)
|
||||
raise StandardError, "There was an error generating PDF preview, blob id: #{blob.id}"
|
||||
|
|
Loading…
Reference in a new issue