Questions tagged [refile]

Refile is a modern file upload library for Ruby applications.

Features:

  • Configurable backends, file system, S3, etc...
  • Convenient integration with ORMs
  • On the fly manipulation of images and other files
  • Streaming IO for fast and memory friendly uploads
  • Works across form redisplays, i.e. when validations fail, even on S3
  • Effortless direct uploads, even to S3

Homepage

64 questions
2
votes
0 answers

Rails API upload image with refile and s3 using json

I need to upload image to s3 using refile gem with Rails-API via. json I follow refile guide on how to setup refile with S3 and when I test it with curl the POST request get created successfully but the image did not upload. Request json data: { …
Adham El-Deeb
  • 335
  • 3
  • 16
2
votes
2 answers

Can I configure separate S3 buckets in Refile initializer for different functionalities in a Rails 4 project?

I am using Refile gem to upload images on S3 in Rails 4 project. My requirement is to upload images for separate functionalities into two separate buckets on S3. However, I could find documentation for setting up only one bucket. Is there anyway I…
2
votes
0 answers

Refile Multiple Files and Append

I have an issue regarding Refile and its multiple file options when I perform validation of my forms. When I send a form with attachments (let's say "docs A"), and the form doesn't succeed in its validation (let's say because email was required),…
nicosierra
  • 166
  • 9
2
votes
1 answer

Ruby on rails: Using Refile Gem, displaying the images without cropping or distorting images

I'm able to upload multiple images, but I'm not sure how to customize the size of the image. This is how I view the images: <%= attachment_image_tag(image, :file, :fill, 300, 300) %> :fill : crops the images 300, 300 : is the height and…
hellomello
  • 8,219
  • 39
  • 151
  • 297
2
votes
1 answer

Refile upload to S3 still returns localhost upload

I followed the tutorial at refile/refile and try to use `refile-s3 to upload my photos to S3. However, it is still uploading to my localhost.. I wonder why?? Code in Github: https://github.com/chrisyeung1121/refile-example Am I missing anything?
Chris Yeung
  • 2,613
  • 6
  • 34
  • 57
2
votes
1 answer

FactoryGirl with Refile gem

I choose refile gem to handle file uploads in my application. I have some trouble with use it with FactoryGirl. In my factory I have something like that: include ActionDispatch::TestProcess FactoryGirl.define do factory :company do …
Mateusz Urbański
  • 7,352
  • 15
  • 68
  • 133
1
vote
1 answer

How to block a form to be sent while the pictures are not uploaded using Refile?

Im using refile to upload some images inside my application. This is my view. <% if current_user.talent.digital_full_length_1.present? %>
Fernando Maymone
  • 665
  • 1
  • 8
  • 17
1
vote
1 answer

How to migrate from Refile to ActiveStorage?

Any idea how to migrate a running project using Refile to the new rails's Active Storage? Anyone knows any tutorial/guide about how to do that? Thanks, Patrick
alispat
  • 45
  • 2
  • 5
1
vote
1 answer

Refile returning Aws::S3::Errors::Forbidden: error

All of a sudden Refile gem has started throwing Aws::S3::Errors::Forbidden: error while trying to fetch images from S3 bucket. Although I am able to upload/fetch new images, this issue occurs only for older files. I tried adding new bucket policy…
Abhinay
  • 1,796
  • 4
  • 28
  • 52
1
vote
0 answers

Using refile gem to upload a photo in activeadmin

Currently, I am using refile for my users to upload photos in their profile. I am trying to be able to add photos to their profile for them through active admin. For some reason, I can't get it to work. Does anyone have an example of working code?…
1
vote
0 answers

Refile Gem not having cropping option while uploading

Apart from Stack overflow I have tried other stuff but not able to get the cropper implemented on Refile Gem. Thanks in Advance
blazetango
  • 61
  • 1
  • 9
1
vote
1 answer

Refile Metadata for Multiple Attachments

Using the refile gem, I want to save filenames for multiple uploads. I've opened an issue on github here, but want to reach out to SO also. It's actually noted here on SO also. Following the readme, I've applied the correct strong_params, I can see…
1
vote
0 answers

image upload with active admin and refile

I am using Active admin as my rails application backend. I want to make an image upload on the admin panel with refile uploader. Active admin depends on formtastic form builder, so I added "refile-input" gem which integrates refile with…
1
vote
0 answers

Active Admin image upload with refile

I am using Active admin as my rails application backend. I want to make an image upload on the admin panel with refile uploader. Active admin depends on formtastic form builder, so I added "refile-input" gem which integrates refile with…
1
vote
2 answers

Refile and 'aws-sdk' V2 gem getting Missing Region Error

I am using the latest version of the refile gem to upload images to AWS and it's working fine. when I try to test my app with rspec i get this error: /aws-sdk-core/plugins/regional_endpoint.rb:34:in `after_initialize': missing region; use :region…