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
1
vote
0 answers

rspec require lib only in one model

I'm using refile gem and wanna test the uploader with rspec. Since I'm using refile only for one model in the app I wanna avoid requiring it in rails_helper. If I try to require it as you see below then I will get require': cannot load such file --…
Sean Magyar
  • 2,360
  • 1
  • 25
  • 57
1
vote
0 answers

Refile Rails gem slow load direct URLs

I am using Refile to upload and serve images for my Rails 4.2.5 app and loading direct URLs to the images using Cloudfront is very slow. To the point where Heroku is continually sending me notifications of longer than usual load times for each image…
Karl
  • 595
  • 1
  • 10
  • 31
1
vote
1 answer

Refile: Image links lost after deployment with Capistrano 3

I have tried to add attachments to linked directories in my deploy.rb, but the links to images still vanish after every deploy on Linode. What should I do to keep image links after deployment?
R Milushev
  • 4,295
  • 3
  • 27
  • 35
1
vote
0 answers

rails file uploading via AJAX with refile and remotipart + private_pub involved

I have a rails app with a real time chat (1v1). I'd like to implement a file upload function via AJAX where on submitting the file upload form the filename will show up in the chat without full page reload. I'm trying to use remotipart gem to be…
Sean Magyar
  • 2,360
  • 1
  • 25
  • 57
1
vote
0 answers

How to edit / destroy an attachment uploaded using refile within a rails app

How can I edit / destroy an attachment uploaded via refile within a rails app? I can successfully create attachments from curl, but I can't figure out how to delete them. I read the refile documentation on removing attachments here,…
ipatch
  • 3,933
  • 8
  • 60
  • 99
1
vote
1 answer

How to set a parameter in AFNetworking when sending file to a rails API

I have created an API for my iOS app, so the app can send a csv file to the API, and have the file stored on the server. I'm using the refile gem to process attachments within the rails app. I'm using AFNetworking to send the file to the rails app…
ipatch
  • 3,933
  • 8
  • 60
  • 99
1
vote
2 answers

How to add validation to refile within a rails app?

I have rails app that I created so I could use the API portion of things. I can successfully upload a file to the DB of the rails app using curl, but I can't figure out how I could limit the filetype / content type to just CSV. csv_file.rb…
ipatch
  • 3,933
  • 8
  • 60
  • 99
1
vote
0 answers

Refile sinatra endpoint not found on production server

Using Refile. Ubuntu 14.04 servers (production and development): uploading to S3 backend in presigned mode. Utilizing refile.js for upload.progress reporting All works fine at localhost (development) but accessing the sinatra endpoint in…
Makita
  • 1,812
  • 12
  • 15
1
vote
1 answer

Optimise/compress images uploaded with refile

Is there a way to optimise images uploaded with refile? I use a CDN so the files are mostly just created once, but i would like them to be optimised to save bandwidth. I use Mini Magick for image manipulation, but can this also be used to reduce…
1
vote
0 answers

Mobile upload file to S3 using a Rails Rest API

I have a web app in Rails that has a profile image upload, I`m using Refile gem to upload the photo direct to Amazon S3. But now I need to do this upload from a mobile app too. Witch is the best way to do that? I think about a Rest API in Rails that…
Greg
  • 141
  • 2
  • 8
1
vote
1 answer

Refile Gem: Ignore exception when remote_image_url is invalid or doesn't exist

We are using refile to allow users to upload images to our S3 back end. In addition, we allow users the option of entering a URL to any image on the internet (through the remote_image_url property.) This works fine, as long as the URL entered is…
Drenmi
  • 8,492
  • 4
  • 42
  • 51
1
vote
1 answer

AWS credentials not found in production

I'm deploying a rails app to production using the refile gem for file uploads and connecting to s3 for storage. Everything works great in development I'm getting the following error in production when trying to upload a new image or retrieve an…
Jeff See
  • 47
  • 2
  • 8
0
votes
1 answer

Refile gem how to add a watermark on image

I have a rails 5.2.3 project, and I'm using the refile gem to upload files How can I add a watermark from my file which is in my assets/images directory called logo.jpg?
0
votes
1 answer

I can't get the value of refile.rb fron setting.yml in rails

I would like to call value of setting.yml in config/initializers/refile.rb So I try to set it as follows.But it Does not work as I thought. When I run SPEC file, the value of Refile.cdn_host is empty. I don't know well why this value is empty. can I…
user3395249
  • 69
  • 1
  • 7
0
votes
1 answer

Create Refile attachment from HTTpary on a Ruby model with mongo db

Building a mobile app with Rails backend, I would like to import the facebook profile picture from facebook to my own system using rails. The profile image is located at some url, and the pictures in my backend are being saved using Refile. The…
orberkov
  • 1,145
  • 2
  • 13
  • 27