mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -05:00
fix image preview format
This commit is contained in:
1 parent
d090d79ebf
commit
bab80e9488
1 file changed
+2
-1
@@ -12,7 +12,8 @@ class PreviewDocumentPageController < ActionController::API
|
||||
|
||||
return head :not_found unless attachment
|
||||
|
||||
preview_image = attachment.preview_images.joins(:blob).find_by(blob: { filename: "#{params[:id]}#{FORMAT}" })
|
||||
preview_image = attachment.preview_images.joins(:blob)
|
||||
.find_by(blob: { filename: ["#{params[:id]}.png", "#{params[:id]}.jpg"] })
|
||||
|
||||
return redirect_to preview_image.url, allow_other_host: true if preview_image
|
||||
|
||||
|
||||
Reference in new issue
Block a user