paperclip Questions

4

I'm working on a REST API, trying to upload a picture of user with: grape micro-framework paperclip gem but it's not working, showing this error rails version is 3.2.8 No handler found for #&...
Ebenezer asked 28/12, 2012 at 9:13

3

Solved

For reference I have been following this tutorial: https://devcenter.heroku.com/articles/paperclip-s3 Except I am in localhost testing right now, so I installed the Figaro gem and placed my S3 info...
Evelynneven asked 20/2, 2014 at 15:32

5

Solved

After some research I was able to add styles based on my image_class column. Model.rb has_attached_file :image, :styles => lambda { |attachment| attachment.instance.decide_styles } def decid...
Europa asked 22/4, 2014 at 13:33

1

Solved

I have a ruby on rails app that takes an image file, "attaches it to a member", and uploads it to s3. When I use insomnia and POST directly to the app ... it works, however when I use the exact sam...
Cuneiform asked 9/10, 2018 at 16:16

3

Solved

I would like to read the geometry of a photo off of my S3 container. When it's on my local, this works : def photo_geometry(style = :original) @geometry ||= {} @geometry[style] ||= Paperclip::G...
Retsina asked 1/7, 2010 at 18:51

3

Solved

I use this method for renaming the image before the saving: def rename_avatar self.avatar.instance_write :file_name, Time.now.to_i.to_s end before_post_process :rename_avatar The image is r...
Ara asked 23/4, 2012 at 12:44

3

Solved

Whenever I run a migration in my Rails app, I get an error from SQLite3: SQLite3::SQLException: duplicate column name: photo_file_name: ALTER TABLE "users" ADD "photo_file_name" varchar(255) I a...
Clarkclarke asked 11/11, 2012 at 17:30

2

Solved

I have working Paperclip gem in my app for documents (pdf, doc). I need to pass the document to some other third party application via post request. I tried to convert the paperclip attachment via...
Claudell asked 17/6, 2018 at 0:21

12

Solved

I'm working on a rails app that allows for image attachments to each use account. I'm using paperclip and amazon web services: gem 'paperclip' gem 'aws-sdk' When I run bundle install, I get this...
Vernievernier asked 16/12, 2014 at 2:18

5

Solved

I have a Photo model with an image attribute. The image contains a base64 string obtained from an api. I need to run an after_create callback and I was thinking I could use Paperclip for saving the...
Unrepair asked 15/5, 2014 at 10:34

2

Solved

I'm using paperclip and aws-sdk gems in a Rails 4 app. I define the :path option in my paperclip.rb config, with no :url option: Paperclip::Attachment.default_options[:path] = ":class/:attachmen...
Melodize asked 6/1, 2015 at 20:52

11

Using Paperclip 3.0.1 in rails 3.2.2 I got this error: **Paperclip::AdapterRegistry::NoHandlerError** (No handler found for "2009-11-29-133527.jpg"): In my model I have: class Product < Ac...
Shagbark asked 5/4, 2012 at 17:50

3

Solved

I realized something quite strange when attempting to upload an image via the paperclip gem for my user model (under the avatar attribute). For some reason there User.update and @user.update_attrib...
Trost asked 29/12, 2014 at 5:53

1

Solved

I've registered a MIME Type to allow Paperclip to read a .docx file's content_type as application/vnd.openxmlformats-officedocument.wordprocessingml.document. However in tests the content_type is ...
Furlough asked 27/7, 2017 at 10:50

6

As the title suggests, I accidentally add some random attachment columns to my model. Say I did rails generate paperclip portfolio href How do I remove those columns created? rails destroy papercl...
Denmark asked 20/8, 2014 at 1:19

1

I'm using paperclip to upload files of the mime-type "application/octet-stream", but they aren't validating properly. In the controller, when I call replay.save!, I get the following error: Valid...
Intendment asked 3/12, 2016 at 22:22

4

I tried storing a local image in a rails console. Because I have many pictures in my local storage (I use crawler to download tons of pictures), I want to store them into a database, with the bene...
Trip asked 13/1, 2011 at 12:52

3

How can I generate the first page of a pdf as a thumbnail in paperclip? I tried a lot but it's not working has_attached_file :book_url, :styles => { :thumb => "100x100#", :small => "1...

1

So far everything works in the backend regarding Rails and Paperclip. I have it set up so that when you create a new Post, the image within that post will be uploaded to AWS S3. It works fine on th...
Pisolite asked 14/10, 2017 at 1:9

3

Currently, I adopt Carrierwave for users to images. However, I hardly find a solution for image security, i.e. how to set image authorisation for the uploaded images to only let certain user in th...

4

Solved

How do I fetch the file size of each style of a paperclip attachment? @user.attachment_file_size doesn't seem to work @user.attachment(:style).size gives a number not related to the actual file...
Caddaric asked 10/2, 2013 at 22:11

8

The scenario is a normal model that contains a paperclip attachment along with some other columns that have various validations. When a form to to create an object cannot be saved due to a validati...
Trencherman asked 4/3, 2011 at 19:58

3

I'm migrating my app from Rails 3.0.9 to 3.2.3 and ruby 1.9.3. I was using paperclip(2.3.11) with aws-s3 gem to store my pictures. Now I want to use the last version of paperclip(3.0.1) and then I...
Sanity asked 7/4, 2012 at 9:52

3

Solved

I'm currently uploading an image with PaperClip and ImageMagick. I would like to get the image's average color so I'm doing this (with a before_create hook): def get_average_color img = Magick::...
Bloodhound asked 27/6, 2011 at 21:29

4

Solved

I'm trying to set up a rails app with paperclip and ImageMagick on Ubunutu 10.10, I have managed to make it work but only with bmp files, when i try to upload any other kind of file I get the error...
Orgel asked 24/3, 2011 at 6:33

© 2022 - 2024 — McMap. All rights reserved.