mirror of
https://github.com/docusealco/docuseal
synced 2026-11-07 15:22:33 -05:00
normalize page index
This commit is contained in:
1 parent
1d169668f0
commit
5741bb4db2
1 file changed
+3
-2
@@ -26,8 +26,9 @@ class PreviewDocumentPageController < ActionController::API
|
||||
|
||||
@template = attachment.record
|
||||
|
||||
preview_image = attachment.preview_images.joins(:blob)
|
||||
.find_by(blob: { filename: ["#{params[:id]}.png", "#{params[:id]}.jpg"] })
|
||||
preview_image =
|
||||
attachment.preview_images.joins(:blob)
|
||||
.find_by(blob: { filename: ["#{params[:id].to_i}.png", "#{params[:id].to_i}.jpg"] })
|
||||
|
||||
if preview_image
|
||||
return redirect_to preview_image.url(time: ActiveStorage::Attachment.service_url_time),
|
||||
|
||||
Reference in new issue
Block a user