carrierwave

Uploading Videos to S3 with Carrierwave and Fog

你。 提交于 2019-12-25 03:33:19
问题 I have configured my testapp with Carrierwave and Fog. My goal is to upload videos to Amazon S3 but if I try to upload a video I get an error "pipe broken". It works if I'm just uploading a picture, so my Amazon configs should be ok! Does carrierwave works for videos? Or why does it work for images and not for videos? Carrierwave.rb: CarrierWave.configure do |config| config.fog_credentials = { :provider => 'AWS', :aws_access_key_id => 'XXX', :aws_secret_access_key => 'YYY' } config.fog

Keep getting “no file selected” when attempting to upload an image using carrier wave?

為{幸葍}努か 提交于 2019-12-25 02:38:25
问题 I am trying to implement uploading images with CarrierWave by following this railscast: http://railscasts.com/episodes/253-carrierwave-file-uploads?view=comments , but whenever I submit the image it my error message just says no file selected, when I am clearly selecting a file. I've checked over my code many, many times and I can't figure it out. Here is my products/new.html.erb <h1> new product </h1> <% @product = Product.new %> <% form_for(@product) html => { :multipart => true } do |f| %>

Imagemagick no such file or directory error in Mac

。_饼干妹妹 提交于 2019-12-25 00:40:18
问题 I'm using carrierwave to upload images from my rails app, and later pass that image to resque for resizing them in the background. The image gets uploaded properly. The problem when resque tries to resize it, mini_magick says that "No such file or directory" This is my ImageController code which handles the upload #create image and embed into story def create img_attr = params[:image] img_attr[:media] = params[:image][:media].first if params[:image][:media].class == Array image = Image.new

How can I temporarily store (cache) images before uploading to S3?

谁都会走 提交于 2019-12-24 22:47:02
问题 My rails app is using CarrierWave and Fog to upload images to S3. Remote URLs are working fine, HOWEVER I need to temporarily store local images (from the device it's being uploaded) before I can upload these local images to S3. How do I go about this? How do I cache my images? Vision table: class CreateVisions < ActiveRecord::Migration[5.1] def change create_table :visions do |t| t.string :image t.text :description t.timestamps end end end Vision model: class Vision < ApplicationRecord

Upload video to Cloudinary

冷暖自知 提交于 2019-12-24 22:30:25
问题 I currently have a Rails based site that is hosted on Heroku and allows users to upload personal images and videos. I am currently storing them on S3 with the video encoding being done by Zencoder. So far pretty happy with this however I would like to use a service such as Cloudinary. I have created a demo app that uploads to Cloudinary and am very happy with the way it works but with video this does not seem to be working. I am aware that Cloudinary does not do any encoding and I am not

How to add multiple nested attributes to a multi file upload

寵の児 提交于 2019-12-24 18:43:53
问题 I am trying to set up a multi image upload with carrierwave. I am following the question Rails 4 multiple image or file upload using carrierwave and in particular the answer by @prograils https://stackoverflow.com/a/38769726/4779531. I have an album.rb model and a diapo.rb model. class Album < ApplicationRecord has_many :diapos accepts_nested_attributes_for :diapos, allow_destroy: true end + class Diapo < ApplicationRecord belongs_to :album has_and_belongs_to_many :authors, :join_table =>

How to correctly add the record.image_integrity_error to existing condition?

青春壹個敷衍的年華 提交于 2019-12-24 18:16:11
问题 History: How to display a presence validation conditionally in combination with carrierwave? I'm building an object with this gem: https://github.com/schneems/wicked/wiki/Building-Partial-Objects-Step-by-Step validates :name, :presence => true, :if => :active_or_name? validates :details, :presence => true, :if => :active_or_details? validates :image, presence: true, image_size: { width: { min: 400 }, height: { min: 400 } }, :file_size => { :maximum => 5.megabytes.to_i }, if: :active_or

carrierwave image not loading into source code

 ̄綄美尐妖づ 提交于 2019-12-24 15:05:59
问题 Not sure what I'm doing wrong on this one. I've followed the Rails Cast for Carrierwave but am having a strange bug where the image isn't showing at all - the (HTML) source code is showing the image tag but nothing inside it. Portfolio Model code: class Portfolio < ActiveRecord::Base validates :title, :content, presence: true mount_uploader :feature_image, FeatureImageUploader end Feature Image Uploader code: class FeatureImageUploader < CarrierWave::Uploader::Base storage :file def store_dir

carrierwave extension_white_list not working

守給你的承諾、 提交于 2019-12-24 11:44:30
问题 here is a similar case but no solution CarrierWave extension_white_list doesn't seem to work Carrierwave provides a function extension_white_list which is supposed to prevent a user from uploading an invalid file. I have uncommented this function but how do I handle this case? I want to catch this error and inform the user that he should change the file. this wiki entry seems relevant but I'm not sure how to proceed https://github.com/carrierwaveuploader/carrierwave/wiki/How-to%3A-Validate

Errno::EPERM (Operation not permitted FILE_PATH) when uploading image with Rails, Carrierwave, Amazon EC2

放肆的年华 提交于 2019-12-24 10:57:09
问题 I am getting an error in production that is preventing me from uploading an image to Amazon EC2 using Rails and Carrierwave. The application works perfectly on my local development server, but in production I am getting this error Completed 500 Internal Server Error in 6319ms Errno::EPERM (Operation not permitted - /FILE/PATH/TO/IMAGE/DESTINATION): I checked to make sure that the destination file has all the correct permissions. It is the upload directory, which I made sure that the entire