shrine

Rails 5 pdf preview with Shrine Gem

雨燕双飞 提交于 2019-12-11 17:37:43
问题 I am using Shrine Gem for image uploads and was wondering how, if possible, can I show a 1st page preview in my template like showing an image per-say. I am ok with using jQuery or other library. Below is my code for the file upload, including my Shrine initializer and uploader file. view ... <div class="col-md-4 upload-block"> <%= f.label :spec_sheet, 'Spec Sheet' %> <% if @product.spec_sheet.present? %> <div class="product-image"> <%= image_tag(@product.spec_sheet_url(:thumb)) %> <div class