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
2 answers

Cannot retrieve Shrine metadata

I am switching from Paperclip to Shrine because of Paperclip deprecation. In my model Profilepic.rb file I used to retrieve dimensions of an image variant as follow: before_create :save_ratio def save_ratio geo =…
Maxence
  • 2,029
  • 4
  • 18
  • 37
0
votes
1 answer

Tus server Integration with shrine "Dealing with large uploads filesize > 1 gb"

I am trying to integrate the tus-server with shrine to upload the video files to Vimeo. Client.js this.uppy = new Uppy({ id: 'uppy1', autoProceed: false, debug: true, restrictions: { allowedFileTypes: ['.mp4'], }, …
parwatcodes
  • 6,669
  • 5
  • 27
  • 39
0
votes
1 answer

After Capistrano deploy my images uploaded via shrine arent displayed anymore (Rails + SQlite3)

When i try to deploy my new application, everything went smooth. But i used to had the problem that my posts in my db disappear after a capistrano deploy. I found out, that this has to do with my Sqlite3 DB and that i have to add the shared path for…
Sebastian
  • 61
  • 6
0
votes
0 answers

Active Storage with Texteditor?

I am very new to Ruby and Ruby on Rails but I am trying to develop my own little Blog project. I followed a pretty good guide on YouTube to get started with it. Currently I can create posts, edit and delete them and they are getting pretty okay…
Sebastian
  • 61
  • 6
0
votes
1 answer

Shrinerb producing blurry PDF file uploads

I've searched but cannot find any info on uploading pdf files with Shrine. I have it working, but the pdfs are blurry and pixelated, even when referencing the (:original) version. initializers/shrine.rb require 'shrine' require…
Charles Smith
  • 3,201
  • 4
  • 36
  • 80
0
votes
1 answer

Image file getting removed after reading in rails seeds file

Using this in rails seeds file for picking random images. Room.all.each do |room| count = rand(1..5) count.times do room.photos.create!( image: File.new(Dir['app/assets/images/sampleimages/*.jpg'].sample)) end end But after…
Abhilash
  • 2,864
  • 3
  • 33
  • 67
0
votes
1 answer

Process file base on filetype [Gem Shrine]

I have a field in a form where user can upload images or document (pdf, word, excel etc). How to tell Shrine uploader to process uploaded file base on it's filetype. class FileUploader < Shrine plugin :processing plugin :versions plugin…
Aipack
  • 94
  • 9
0
votes
2 answers

Rails destroys upload on has_one association

I have an organization model with an association has_one :uploads, as: :uploadable It's a polymorphic relationship to class Upload < ApplicationRecord include Uploaders::StandardUploader::Attachment.new(:file) belongs_to :uploadable,…
Kevin Brown
  • 12,602
  • 34
  • 95
  • 155
0
votes
1 answer

Error "SignatureDoesNotMatch". Google Cloud Storage Bucket PUT

I'm loosing my mind. I'm using Shrine (https://github.com/janko-m/shrine) with Google Cloud Storage (https://github.com/renchap/shrine-google_cloud_storage), but when I start the PUT call I get…
user4412054
0
votes
1 answer

Upload files with Shrine through Listen gem

I have a problem, I'm using Listen gem to tracking folder for new files added, after added a new file I want to copy it to the other storage with Shrine, but Listen gem return me in "added" variable a path to added file, but Shrine is need a object…
0
votes
1 answer

Ruby on Rails Shrine Gem add a value to a new instance in form_for form

I have a form_for form that is using the Shrine gem to upload an image onto my machine. I am creating the new instance in the html file. I am trying to set the cached_image_data for the new instance because I am getting an error when I try to…
almusavi
  • 1
  • 2
0
votes
1 answer

Rails 5 pdf preview with Shrine Gem

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…
Charles Smith
  • 3,201
  • 4
  • 36
  • 80
0
votes
1 answer

Ruby Shrine - crop & direct upload Safari issue

I am implementing direct upload with Shrine, jquery.fileupload and cropper.js in the add portion I am loading the image from the file upload to modal, define the cropper and show the modal if (data.files && data.files[0]) { var reader = new…
Anton
  • 540
  • 3
  • 13
0
votes
1 answer

Rails Shrine image upload to google drive error

I am trying to upload images to google drive using Shrine. I followed instructions from this gem https://github.com/verynear/shrine-google_drive_storage I added this gems to my project gem 'shrine' gem 'shrine-google_drive_storage' This is my…
Mišel Ademi
  • 187
  • 4
  • 15
0
votes
0 answers

Issue with uploading multiple files to rails per project

I am building a project management application and I am using shrine to do file uploads. I got it working with only having one attachment per project, but now I want to set it up so that I can upload multiple files for any given project. Here is how…
spacerobot
  • 265
  • 1
  • 5
  • 23
1 2 3
9
10