Questions tagged [shrine]

Shrine is a file upload toolkit for Ruby, it's designed to be simple, extensible, secure and fast, and provides an abstraction for different storages.

Shrine is a file upload toolkit for Ruby with the following characteristics:

  • It's composed entirely out of plugins, making it very extensible and flexible

  • It makes direct AJAX uploads to the application or S3 dead easy

  • It's designed from day one with backgrounding in mind (Sidekiq, Resque etc.), but it still retains seamless user experience

  • It provides a simple instance-level interface for file processing and validations

  • It comes with filesystem and S3 storage, but provides nice abstraction for other storages as well

It was created and is currently maintained primarily by Janko Marohnić.

141 questions
0
votes
1 answer

ReferenceError uppy is not defined

Error image I implement shrine gem with cropperjs and uppy in rails, I refer to Usage of shrine Image Cropping and Example code Then I implemented code, seemingly code is correct, But I got some errors Module not found: Error: Can't resolve…
Mick mic
  • 60
  • 9
0
votes
1 answer

Module not found: Error: Can't resolve 'cropbox' 2

I asked question Module not found: Error: Can't resolve 'cropbox' But I didn't get an answer, so I have to focus on more specific issues and searching in StackOverflow, So that I get three problem 1 rails doesn't load cropbox.js 2 clopbox.js…
0
votes
0 answers

How to use the cropperjs in rails.6.0.2

I implemented cropper js with the shrine gem, I refer to https://github.com/shrinerb/shrine/wiki/Image-Cropping, And this codes https://github.com/shrinerb/shrine-crop-example/, But doesn't work it, Doesn't appear error, why does not work cropper…
Mick mic
  • 60
  • 9
0
votes
1 answer

ActionView::Template::Error (undefined method `image_url' for #)

I'm using the shrine gem in form object, I want to clip images, so, I followed https://github.com/shrinerb/shrine/wiki/Image-Cropping, but, happed above error, I think that it seems to be don't recognize photos models views <%= form_with model:…
Mick mic
  • 60
  • 9
0
votes
1 answer

Unpermitted parameter: :photos_attributes

I want to use shrine gem in nested form, But happened Unpermitted parameter: :photos_attributes How to solve it? I tried some ways, that def blog_form_params params.require(:blog_form).permit(:title , :content ).merge!(user_id: current_user.id…
Mick mic
  • 60
  • 9
0
votes
0 answers

Can I run two uploaders in a Ruby On Rails App

I have a Ruby On Rails app (Ruby 2.3.8 Rails 4.2.7.1) running Shrine as an image and document uploader. I want to do an integration with the image manipulation company Cloudinary which uses Carrierwave as an uploader. Do I need to re-write the…
0
votes
1 answer

Shrine - cannot read an attachment a second time

After migrating from Carrierwave to Shrine, some of the tests started to failed. I've noticed that when calling #read from the column where the Shrine uploader is mounted, it can only by called once. By doing a second #read will return an empty…
jpac
  • 69
  • 5
0
votes
2 answers

How to define url X-AMZ-Expires in Shrine configuration

When we call the method url the value for X-AMZ-Expires can be defined with the argument expires_in. Is there a way to define this on Shrine's configuration file or in the uploader so that every time I call url I wouldn't need to give the value of…
jpac
  • 69
  • 5
0
votes
1 answer

Does Shrine Storage S3 supports options for IAM Profiles?

His there an option that can be sent as an argument of Shrine::Storage::S3.new that sets the use of an IAM Profile to true, just like Carrierwave does? For example: s3_options = { use_iam_profile: true, } Shrine::Storage::S3.new( …
jpac
  • 69
  • 5
0
votes
1 answer

Configure the way file ID attribute is generated on Shrine gem

Shrine creates a random ID for the uploaded file to AWS S3 when calling presign_endpoint. Is there a way to change the way the ID is generated using Shrine's configuration?
jpac
  • 69
  • 5
0
votes
3 answers

Cant upload xls file while can upload xlsx files by Shrine Uploader

I want to upload an xls file(Libreoffice) via Shrine uploader gem, however I am getting an rollback error like File type must be one ..(There are mime types here in my initializers/shrine.rb ).. Here is my shrine.rb require "shrine" require…
Hakan
  • 11
  • 4
0
votes
1 answer

Add --density flag to libvips command with image_processing?

I'm trying to add the --density flag to the libvips command so that PDFs (or other vector images) convert to JPG at an acceptable resolution. Context—before I upgraded to a recent version of image_processing, I was using MiniMagick with the older…
Dauncing
  • 107
  • 1
  • 8
0
votes
1 answer

How to decrypt file (encrypted with aws KMS) when downloading from aws S3 via Shrine?

I use Shrine in my Rails app to upload files to Amazon S3. Some of the user's files connected to GDPR compliance and I need to implement client-side encryption ([Shrine documentation]…
Roman Malkevych
  • 260
  • 1
  • 4
  • 11
0
votes
1 answer

Shrine gem with Rails: generate versions with upload endpoint?

I use Shrine gem with Rails 5. I enabled plugins upload_endpoint, versions, processing and recache. I expected to get generated versions in upload endpoint response. class VideoUploader < Shrine plugin :processing plugin :versions plugin…
Molfar
  • 1,411
  • 3
  • 18
  • 49
0
votes
1 answer

WickedPDF generated PDF file upload with shrine does not populate data field

I am migrating from Paperclip my whole uplading process and have a problem regarding generated PDF. Child model that handles the upload is a polymorphic model named quotepdf At some point a quotepdf instance is generated and has an attachment linked…
Maxence
  • 2,029
  • 4
  • 18
  • 37