Questions tagged [carrierwave]

1

votes
0

answer
127

Views

carrierwave process uploaded file in a custom way

I want to do the following: convert the uploaded file to jpeg2000 using the command kdu_compress not use rmagick or minimagick to do this stuff All examples in carrierwave are using rmagick or minimagick, and act on a in memory loaded image file. So I don't really know how to convert something using...
user2814957
1

votes
1

answer
241

Views

upload and show multiple images in cloudinary using carrierwave

I have a form field as below through which I can add multiple images at once. I am uploading image in admin panel which uses active-admin gem. form(html: { multipart: true }) do |f| f.inputs do f.input :title f.file_field :photos, multiple: true end f.actions end I want to be able to add multiple im...
CCR
1

votes
1

answer
257

Views

React / Rails API Image Uploading

I've built a React frontend along with a Rails API only backend. I want to allow the user to create a task and enter a title, description and upload an image. So I've attempted to use DropZone to get access to the image and then send the image info along with the title and description to my Rails AP...
TURN_Jimmy
1

votes
0

answer
132

Views

Rails 5.1 - MiniMagick & Jcrop for Carrierwave Image Upload

I have an image uploader & cropping method for uploads. However once I upload the image the selected cropping area is not selected and instead is cropping a different area of the image. I initiate the cropping method using the call back :after_update Rails 5.1 - MiniMagick - Carrierwave - JQuery-Jcr...
Alexander Smith
1

votes
0

answer
113

Views

Rails 5: dynamically get the model name to create versions with Carrierwave

I'm trying to dynamically create a version of a Carrierwave image if the polymorphic association is of a certain model, and skip it otherwise. For instance: user.rb class User < ApplicationRecord has_many :pictures, as: :imageable, dependent: :destroy end listing.rb class Listing < ApplicationRecord...
DaniG2k
1

votes
1

answer
37

Views

Carrierwave: “recreate_versions!” strange behaviour

I have an avatar uploader which has multiple versions. Some of them are generated synchronously on upload, others are generated conditionally on request (following this approach): user.avatar.is_processing_delayed = true user.avatar.recreate_versions!(:png_x60y80) I put this code in a controller and...
alexb
1

votes
2

answer
202

Views

Heroku: NameError: uninitialized constant User::AvatarUploader

I have been trying to google this question for a while and am not finding any answers. For some reason, my app works fine when I run on localhost but not when I deploy to heroku. I think the relevant gems/services are Heroku, CarrierWave, and possibly Devise & Fog-AWS. rails aborted! NameError: unin...
marko calvocruz
1

votes
0

answer
143

Views

How to display unsaved images in preview mode Rails

I am building a job app with rails. In my job 'new' page, I have a preview functionality where a user can click on the 'preview' button to have a look at how the job posting would look like. In creating the job, the user would need to upload a company logo. I would like to find a way of previewing t...
Hakeem Baba
1

votes
1

answer
141

Views

Rails carrierWave permit parameters

I am having a problem in uploading an image in Rails 4.2.6 with ruby 2.3.0 and CarrierWave. I have a podcast model, and when I am trying to create a new model from the form, providing name, description and a .jpg image, I get the following error: Missing template podcasts/create, application/create...
mychemicalro
1

votes
0

answer
32

Views

Multiple image Uploader using carrierwave for single model

I have created a gallery module and i have added two uploaders for single model. The code works fine but the when i upload the multiple images and try to edit that I get multiple options for uploading the same image. How do I fix that? Can we use two uploaders for same model or do we have some other...
Sahil Omer
1

votes
1

answer
55

Views

Nodejs file attachement handler

I am looking for resources for file attachment handling in nodeJs. I am from rails background so there are two popular resources which do things out of the box for developers ex. carrier wave and the paperclip. they provide pretty straight integrations with s3 and Google cloud storage. I want to a...
Rahul Sharma
1

votes
0

answer
70

Views

carrierwave-video not processing video

I am trying to transcode video files and upload them to s3. To do this, I am trying to use the carrierwave-video gem for transcoding. For uploading I am using carrierwave and for background processing I am using carrierwave-backgrounder with a combination of activejob and sidekiq. After transcoding...
user3799793
1

votes
1

answer
29

Views

rails4.2.8 carrierwave+mini_magick+Jcrop, failed to upload picture

I used: gem 'rails', '4.2.8' gem 'carrierwave', '~> 1.2', '>= 1.2.2' gem 'mini_magick', '~> 4.8' gem 'Jcrop', '~> 0.1.0' and ruby-2.5.0. My picture_uploader.rb is like this : # encoding: utf-8 class PictureUploader < CarrierWave::Uploader::Base include CarrierWave::MiniMagick storage :file def store...
SylorHuang
1

votes
1

answer
185

Views

Carrierwave Uploader specify Version directory using same file name for Rails 5

I want to use the same file name but a different directory for a version of my uploaded file. upload file imageName.jpg should create uploads/drawing/2018/imageName.jpg #which is the original file uploads/thumbs/2018/imageName.jpg #a 120 x 100 scaled version of the original file In my: cla...
ESim
1

votes
1

answer
82

Views

undefined method `images_will_change!'

I am posting a question for first time so please ignore the styling part. I am using Carrierwave for multiple file uploads.But I am not able to do so. API ONLY Controller code: def create @comment = Comment.new(comment_params) @comment.save end def comment_params params.require(:comment).permit(:des...
Ashu Chauhan
1

votes
1

answer
336

Views

missing required option :name

I am trying to set up AWS, and carrierwave to upload pictures from my website. I keep getting the error 'missing required option :name' when I try to upload/update the posts though. I have followed tutorials to set up my S3 account and to get carrierwave.rb set up. Please let me know if you have any...
Steph Simpson
1

votes
1

answer
129

Views

Ruby on Rails : Background CSS Image from Database

I want to create a picture management through my ActiveAdmin administration panel. I use Carrierwave to upload images from my administration panel, however I fail to display these images as background-image within my CSS code... :/ ...because of the following error: couldn't find file '' Here is my...
1

votes
0

answer
239

Views

[fog][WARNING] Unable to fetch credentials: No route to host - connect(2) -(Errno::EHOSTUNREACH)

Hi I configured carrierwave with amazon s3 in ruby on rails. In the console show me this message [fog][WARNING] Unable to fetch credentials: No route to host - connect(2) -(Errno::EHOSTUNREACH) And my app is lag to load, but when i tried to upload a file the application hangs but the file is upload...
HalleyRios
1

votes
0

answer
25

Views

CarrierWave not uploading files to s3, but to cache (Sinatra app on Heroku)

I have a Sinatra app which takes in an image and am trying to upload that to s3. The response I receive says that the model is successfully saved, but the image URL it returns on saving is the cached upload. No image shows up in the s3 bucket either. The code is below, is there an obvious error? I w...
digerati32
1

votes
1

answer
56

Views

RoR - Carrierwave + S3, storing image urls via API

I'm working on a system for uploading images to S3 with Carrierwave. There are two possible ways to upload image: Upload from file to S3 Manual upload via API Upload from file is working great. File is formated in base64 and sent to server which is procesing and uploading with carrierwave to S3. My...
code monkey
1

votes
0

answer
23

Views

How to fix the PG:Error: lo_unlink with Carrierwave-Postgresql

I'm currently using the carrierwave-postgresql gem on Rails 5.2. The issue I am having, is I cannot delete objects from my database that have the oid data-type/column attached to them. I tried to do a model.destroy_all, and then I received the error message below in my Rails Console Model.destroy_al...
Cole Phiper
1

votes
0

answer
35

Views

Sidekiq job not being added to queue after record commits for carrierwave-video

I setup carrierwave_backgrounder, carrierwave-video, and carrierwave-ffmpegthumbnailer to encode video files after the initial record is inserted into the database (postgresql). The issue that I am having is, I can only start the encoding process in rails console. For some odd reason, it doesn't beg...
Cole Phiper
1

votes
1

answer
53

Views

How to send an array of images along with data per image using Retrofit 2?

Let's say I have this model: data class PhotoRequest( @SerializedName('page_number') val pageNumber: Int, @SerializedName('image') val requestBody: MultipartBody.Part ) The multipart is created using this: val photo = File(picturePath) val requestFile = RequestBody.create( MediaType.parse('image/jpe...
Gabriel Aguirre
1

votes
0

answer
32

Views

Regression Testing Heroku Request Timeout

My Rails app currently has a thumbnail upload endpoint which frequently times out on Heroku due to the 30 second request limit. I use Carrierwave and would like to switch to CarrierWaveDirect to solve the problem by doing direct to S3 uploads. Before I do so, I would like to write a regression test...
Maros Hluska
1

votes
0

answer
112

Views

Excon::Error::Forbidden (Expected(200) <=> Actual(403 Forbidden) excon.error.response when editing a resource

I am trying to edit a book on my review app. Recently got AWS S3 to work with carrierwave. I've granted the user S3 Full Access and Administrator Access permmissions yet when I go to submit the edit form I get this error: Excon::Error::Forbidden (Expected(200) Actual(403 Forbidden) excon.error.resp...
dmberko11
1

votes
1

answer
66

Views

Is Carrierwave thread-safe?

I'm using Sidekiq and Carrierwave to upload images to S3. The background job does the following things: Downloads image from a remote url; Resizes it using minimagick; Uploads the resized images to S3. Here's the code snippet: def store_for_mobile(file) self.class.process optimize: [1080, 810] %w(an...
Stan666
1

votes
0

answer
56

Views

CarrierwaveDirect version filename porting from CarrierWave fog

So I've got 9000+ original images, each with 5-7 generated sizes, already stored on S3. Moving production to Heroku and one of the issues we have is timeout on large master images. Started trying Carrierwave Direct gem to go straight to the S3 store and then process async, but ran into an issue wit...
John Athayde
1

votes
1

answer
142

Views

Accessing AWS s3 files only from React Native App

I'm creating a react native app, which is using images and audiofiles from an AWS S3 bucket. I use rails and carrierwave in the backend to upload images and audiofiles from the users. But, I need the files to be only accessible by the users of the mobile app in some way. I figured I would use a sign...
Marius W
1

votes
0

answer
44

Views

Uploading multiple photos to Cloudinary with Carrierwave only uploads one photo

I've been looking for a long time for the answer, but nothing has helped yet. I've been following the tutorial on the Github page for Carrierwave (https://github.com/carrierwaveuploader/carrierwave/blob/master/README.md#multiple-file-uploads). Just like the instructions (replacing user for restauran...
OKMantis
1

votes
1

answer
49

Views

Rails Carrierwave upload multiple files undefined method `[]' for nil:NilClass

someone please can clarify why this undefined method `[]' for nil:NilClass is happening on upload files with rails, carrierwave and react? the rest of the code are very standard, so in the logs on upload image always the image attribute from post_attachments shows blank. i suspected that the probl...
1

votes
1

answer
21

Views

React get and show attached files in Rails

seems a simple problem but, i don't know why this is causing a little stress, anyway. here is situation: after get the attachments on the Post.show in rails async getAttachments() { // this.setState({showProgress: true}) let auth_token = window.localStorage.getItem('auth_token'); let post_id = this....
1

votes
0

answer
219

Views

Aws::S3::Errors::AccessDenied: Access Denied - Carrierwave

I am using the carrierwave-aws gem to handle user avatars. I have created an s3 account and bucket and created an IAM user. I granted the IAM user AmazonS3FullAccess policy. I also copied the same policy to the s3 bucket (making it public). My keys are stored in my enviornemnt and I have triple-chec...
Noura
1

votes
0

answer
27

Views

minitest shows error while testing carrierwave

I am trying to test picture uploads using carrierwave. I am following this tutorial. https://jeffkreeftmeijer.com/carrierwave-rails-test-fixtures/ but getting errors. models/product_test.rb require './test/test_helper' class ProductTest < ActiveSupport::TestCase test 'has an avatar' do product = pro...
kokoro
1

votes
0

answer
29

Views

Carrierwave undefined method `[]' for nil:NilClass during Capistrano deployment

I am trying to deploy a new release using Capistrano and I am getting an error during asset:precompile task undefined method []' for nil:NilClass The full stacktrace is as follows: /home/deploy/bikeramp/releases/20190108123149/config/initializers/carrierwave.rb:5:in `block in ' /home/deploy/bikeramp...
jedi
1

votes
1

answer
164

Views

How to get a access url for an object in S3's private bucket using carrierwave

I am uploading my file to s3's private bucket using carrierwave whose policy is 'Bucket and Object are not public'. Now when I try to generate an access url with @docuemnt.pdf_file.url for my object in that private bucket I am getting an error which says ' bucket_name is required ' even after passi...
Anjan
1

votes
2

answer
34

Views

Uploading .MOV files with carrierwave-video?

Issue: I am unable to upload .mov files via Carrierwave. I have no issue with carrier wave with uploading images, and for video - .mp4 files. When i attempt to upload .mov files, the upload fails. I'm assuming anything other than .mp4 will not work. Anyone use Carrierwave-video gem and are able to...
uno
1

votes
0

answer
19

Views

Resizing an image similar to CSS3 object-fit: cover

I'm using Carrierwave and Imagemagick. At times I have images that come in with portrait dimensions. In my uploader file I have images set to resize_to_fill. process resize_to_fill: [600, 600] It creates an image to my specifications but as expected it keeps the aspect ratio while filling in the rem...
Carl Edwards
1

votes
2

answer
1.9k

Views

Rails Carrierwave White_List not throwing Exceptions

Just started using carrierwave with Rails and things have been going smoothly with one minor exception. I created a 'ImageUploader' class which looks so: class ImageUploader < CarrierWave::Uploader::Base include CarrierWave::RMagick def extension_white_list %w(jpg jpeg gif png) end end and a contro...
Will Ayd
1

votes
1

answer
1.2k

Views

Mongoid and carrierwave

In order to remain DRY, I have a class ModelBase that includes Mongoid document as follows: class ModelBase include Mongoid::Document alias_attribute :guid, :id def as_json(options = {}) azove_hash = options.merge(:methods => :guid) super azove_hash end end then all my models inherit from ModelBase...
joque
1

votes
3

answer
886

Views

Question about Amazon's Cloud Front with regards to Rails app w/image uploads

Newbish AWS question: Our Rails app currently allows image uploads via Carrierwave to an S3 bucket. Things work well...but it's starting to get a bit confusing (and cumbersome) as some original files are in one bucket (uploaded photos) while others are in another bucket (site logos, etc) while still...
Meltemi

View additional questions