Questions tagged [carrierwave]
A modern ruby gem for file uploads in Rails and other frameworks, similar to paperclip and attachment_fu
3,035
questions
2
votes
1
answer
64
views
CarrierWave Multi-uploader Renames Existing Files
I have followed the CarrierWave documentation for multi-uploaders and you can upload multiple files as expected, however if the user uploads files a second time the original files get moved from file....
-1
votes
0
answers
26
views
How does the validates_download_of method work in carrierwave?
Please tell me how exactly the validation method validates_download_of works? It's not entirely clear from the description. Will they check that the downloaded file was successfully placed in storage ...
0
votes
0
answers
27
views
How to fill in columns tied to carrierWave without going through carrierWave
In developing a Ruby on Rails application, when I pass a file object to a column in a model with a CarrierWave set, it will correctly populate that column as well as save it to storage.
However, the ...
0
votes
0
answers
12
views
Not Displaying Image with Carrierwave using Rails 6
I was looking for a way to upload photos to the database and display images on a page. I am using Carrierwave. The image uploads correctly, but when it goes to display, it will not. When I tried to ...
0
votes
1
answer
60
views
My Ruby on Rails active record validation error does not persist when I re-render the same view
I'm using Rails 7 and Carrierwave to upload images.
My image uploading is working as expected, but my issue is happening when I try to implement validation error message for an incorrect file type. In ...
0
votes
4
answers
73
views
Is it possible to disable deletion of a cached file using the carrierwave uploader?
I have a CarrierWave uploader, I need to disable the deletion of cached files after saving them to the store. To then perform some kind of operation with this cached file and delete it manually.
My ...
0
votes
1
answer
37
views
At what point is validation triggered in the model when saving a file on S3 with Carrierwave and Fog?
There is an ActiveRecode model with a carrierwave uploader. I'm interested in the following question. At what point does validation occur? Before the moment the store method is triggered in the ...
1
vote
1
answer
58
views
How to authorize access to images uploaded to S3 by users?
Imagine the app with the ability to upload files by users. Only the author (the person who uploaded this file) and the author's friends should be able to see this uploaded file.
I am using "...
0
votes
0
answers
36
views
Wrong results performing THD calculation with FFT on square wave function in Python
I buitlt a function which should perform a FFT first on a generated function, later on real data. Then I want the THD (Total Harmonic Distortion) from the signal. To proof the System I want to check ...
-1
votes
1
answer
206
views
Carrierwave cache_stored_file! does not fetch the file in the cache
I am migrating from Carrierwave 1.3.X to 2.2.X and I am running into trouble here and there. One of the snippets that fail for me is this:
def files
signable_template.signable_documents.map do |sd|
...
0
votes
0
answers
14
views
Uploading files to S3 bucket private and show files for client using CloudFront URL [carrierwaver]
We using the carrierwaver to uploads files to S3 on our system based on ruby. The uploaded file we need upload to an S3 private bucket, that URL show to client from cloudfront.
When we change config....
1
vote
2
answers
74
views
After upgrading rmagick from 3.5 to 5.2.0 Carrierwave is sending a error of No Method background_color
n an old Ruby on Rails project using version 4.2.11 with Ruby 2.7.6, we encountered an issue after upgrading RMagick from version 3.5 to 5.2. Specifically, CarrierWave 1.3.1 stopped working when we ...
1
vote
1
answer
71
views
Carrierwave: rename filename / replace file
I already tried multiple solutions from SO, but none of them helped me.
I have uploaded file, that stored in my folder locally. I need to simply rename it's filename (I didn't find any simple way to ...
0
votes
0
answers
49
views
Cannot download images with Carrierwave's remote_image_url if served via IPv6
I've got a Rails model with an associated image that's managed via CarrierWave.
class BlogPost
# ...
mount_uploader :image, BlogPostImageUploader
# ...
end
class BlogPostImageUploader < ...
0
votes
0
answers
130
views
Is there a way to use CarrierWave with Azure these days?
I was using CarrierWave gem + google cloud to upload and store files from my project. Unfortunately I need to switch to Azure cloud so I'm trying to implement the same mechanism as previous (basically ...
0
votes
0
answers
20
views
Reordering images in Carrierwave multiple file upload
I'm trying to make a frontend mini admin system to reorder the product images stored as an array by Carrierwave multiple upload.
Frontend is working fine.
In my view, I have:
<%= form_for ...
3
votes
1
answer
306
views
How do I simulate a bad connection to AWS S3 using toxiproxy?
What I'm trying to accomplish:
I have a ruby on rails app which uses carrierwave to store data using the fog-aws adapter
I'm trying to simulate poor communication with AWS S3
What I've done:
I have ...
1
vote
0
answers
88
views
CarrierWave uploader with CarrierWaveDirect included not generating correct key on non-direct uploads
I am using rails, and have an image uploader that inherits from CarrierWave::Uploader::Base but includes CarrierWaveDirect::Uploader. We are using Fog as storage and AWS S3 as the provider. We use it ...
0
votes
0
answers
105
views
Do not resolve url in tests with Webmock and CarrierWave remote upload
CarrierWave has a nice feature for uploading images from remote locations https://github.com/carrierwaveuploader/carrierwave#uploading-files-from-a-remote-location
I'm using Webmock to stub remote ...
0
votes
1
answer
202
views
Carrierwave with MiniMagick is adding black background color to transparent .png when using remote_url with resize_to_[fit/fill/ect]
Expect the following Uploader, when I upload .png with no background via remote_XXX_url the :thumb version using a resize_to_fit is converted with a black background.
The original file uploaded is as ...
1
vote
1
answer
493
views
CarrierWave: Cannot insert legacy ACL for an object when uniform bucket-level access is enabled
Uploading file to google cloud bucket was working fine when we had "Fine-grained" access. Later it is changed to "uniform bucket-level access". Now upload operations are failing ...
0
votes
0
answers
28
views
Remove signatures from URLs in AWS Carrierwave to speed up loading
I'm uploading lots of images to S3 with Carrierwave,
but my URLS contain aws signatures which leads to very slow loading times.
When retrieving a JSON with 200 records, each image url looks like this:
...
1
vote
0
answers
51
views
Retrieving Carrierwave images with S3 signature ultra SLOW
I'm using Carrierwave + S3 to store my record images in S3.
The problem is when I retrieve 250 records from a JSON file, loading gets ULTRA slow because it needs to sign individually each version of ...
4
votes
1
answer
574
views
Carrierwave Remote URL error raise IOError, 'attempt to read body out of block' if @socket.closed?
I upload an image remotely using remote_url from CarrierWave on my Rails application. It used to work fine but now I get an issue
Controller
@pool = Pool.new(remote_main_picture_url: "https://...
1
vote
0
answers
157
views
How to save base64 encoded image with ruby on rails and carrierwave
I receive a base64 encoded image from another server and need to save it to my postgres database. I am using rails 6 and carrierwave. Here is my model:
class Quin < ApplicationRecord
...
0
votes
1
answer
470
views
Settting up environment variable GOOGLE_APPLICATION_CREDENTIALS
I am trying to setup the service-account and storing the credential file inside linux server and storing the path in GOOGLE_APPLICATION_CREDENTIALS provided by Google.
It is said that Google Cloud ...
0
votes
0
answers
178
views
Any method to generate a small thumbnail for a 3d model?
To get this out of the way: I have little to no experience dealing with 3D aspects of web development. It's also worth noting that I'm relatively inexperienced with Ruby/Ruby on Rails. In my Ruby on ...
1
vote
0
answers
221
views
signed url configuration for google cloud
I am using carrierwave fog-google configuration for file download and upload to GCS bucket. However, my concern is I wanted to have a signed URL returned from GCS response with some expiration time.
...
0
votes
1
answer
428
views
how to test carrierwave fog google in rspec with setting up the configuration
I have below configuration and I wanted to write TC for it in ruby. I am new to ruby and wanted to understand how we can set the configuration of Fog to point to mock and use it in test-case.
class ...
0
votes
1
answer
138
views
uploading large file on google cloud bucket failing
I am uploading a large file from my local system or an remote_url to google bucket. However everytime I am getting the below error.
/usr/local/lib/ruby/3.0.0/openssl/buffering.rb:345:in `syswrite': ...
0
votes
1
answer
280
views
Monterey OSX. `const_defined?': uninitialized constant Fog::Rackspace::CDN (NameError)
I have recently upgraded my OS. from Big sur to Montery.
When I was running my ruby application I am getting an error with careerwave
.rvm/gems/ruby-2.3.1/gems/fog-core-2.3.0/lib/fog/core/provider.rb:...
0
votes
1
answer
232
views
Rails, how to make carrierwave upload SVGs again?
I am upgrading a Rails app fro 3 to 7. With the new App Carrierwave stopped to accept SVG files for upload. Previously I could upload svg files, without processing and the creation of versions with ...
0
votes
1
answer
86
views
Rails: Minitest&Carrierwave ActionView::Template::Error: undefined method `file_name' for nil:NilClass
I am trying to write tests for an app, which uses carrierwave for image uploading. The app is working. I just startet with very simple controller tests.
When trying, for example, to test root through
...
2
votes
2
answers
658
views
Rails: multi-file upload produces one empty entry
I am trying to create some sort of a nested file upload. I have Images and Albums, which are related through the model AlbumImages. Images can be part of an album. The upload is carried out through ...
2
votes
0
answers
339
views
Carrierwave uploading file using fog to google cloud storage without making bucket public and control access fine-grained in rails
Is there a way i can upload files while keeping bucket private and access control uniform?
as i am trying to use carrierwave with fog for this purpose and followed carrierwave gem instructions but i ...
0
votes
1
answer
282
views
Ruby on Rails Carrierwave-vips: Auto Orient not working if exif data is stripped at same time
I'm on Ruby 2.4.0 and Ruby on Rails 4.2.8.
I've moved from mini_magick to vips for handling images on my Ruby on Rails uploader. Due to wkhtmltopdf not supporting EXIF data for images, i have to ...
0
votes
1
answer
195
views
Can we upload files to AWS S3 and Google Cloud Storage simultaneously using CarrierWave gem?
One of my Model's attachments needs to save files on AWS S3 and the other Model should save it to Google Cloud Storage.
Is this possible using CarrierWave gem?
0
votes
1
answer
61
views
ArgumentError: is not a recognized provider rake rails posgresql
I'm trying to clone and setup a rails repo.
when I run bundle exec rake db:migrate I get the following error with no user name:
rake aborted!
ArgumentError: is not a recognized providerronment.rb:5:...
1
vote
0
answers
114
views
Using an existing image on s3 with Carrierwave?
I'm trying to use existing images on my s3 and relate them to a carrierwave object. These images are stored in a different location from the store_dir of my uploader.
I currently have my migration ...
0
votes
2
answers
370
views
CarrierWave / MiniMagick not updating file extension after convert
I'm using MiniMagick with CarrierWave to process some images on a Rails 5.2 app. My goal is to convert the original image to jpg, and create two other versions (resized).
My issue is that while the &...
1
vote
1
answer
562
views
How do I open a CSV file that I uploaded with Carrierwave and Fog to Amazon S3?
I have a model called client_billing_file where I use Carrierwave to upload a CSV file like this:
mount_uploader :billing_file_name, UsageFileUploader
and I schedule a job to run 5 minutes after ...
1
vote
0
answers
97
views
Can't find "key" attribute in model with CarrierWaveDirect gem
I've been trying to implement direct upload with AWS and CarrierWave direct. I'm following the documentation.
I have a model: AppNotice. It has a column called image.
However, it seems like even ...
1
vote
1
answer
420
views
Carrierwave upload and save to database only one file
Carrierwave only saves the first image all the time. It works after the "update" action, but shows an error:
undefined method `reject' for "image/upload/
It stores a string with a ...
0
votes
0
answers
183
views
Rails API cache endpoint with Carrierwave uploader
I'm experiencing some issues when caching some data in my Rails API, when the model has a Carrierwave uploader attached. The issue started when I added versions in my ImageUploader.
The model looks ...
1
vote
0
answers
404
views
Rails 5 How to upload generated csv (carrierwave)?
In my app I want to upload .csv files to cloud using carrierwave, but before I want to test uploader local, but I don't know how to upload generated in app csv string. In my app it looks like that:
/...
0
votes
1
answer
136
views
How to pass Magick::Image object to carrierwave uploader
I'm using Magick to convert PDF pages to images and Carrierwave for file storing management.
This is the method that i'm using and it works:
def convert_to_images
user_cv_images.destroy_all
...
1
vote
0
answers
441
views
CarrierWave config.enable_processing = false does not work in test mode with Rspec
When I run Rspec test with the following factory, it is creating the file on the local repository in public/test/company/
carrierwave.rb
if Rails.env.test?
CarrierWave.configure do |config|
...
0
votes
1
answer
492
views
carrierwave file storage saved in public directory but rails does not recognize path
A carrierwave uploader in a Rails 6.1 application defines
storage :file
def store_dir
"archive/#{model.id}"
end
development.rb does define
config.active_storage.service = :local
The ...
0
votes
1
answer
356
views
Rails + CarrierwaveDirect: Unable to download and process image after successful direct upload to S3
Using Rails 6 and CarrierWaveDirect, we're able to successfully POST a file to a presigned S3 URL, but then we encounter an error when trying to download the file from S3 to our server for processing.
...
0
votes
1
answer
145
views
Rails Carrierwave Unpermitted parameter
that's simple thing at least should be simple bogus me out!
I'm trying to just add an upload multiple photos to user but every time it hits to Unpermitted parameter
So the user is a simple user model ...