fog

Heroku timeout when uploading big file to s3

一笑奈何 提交于 2019-12-20 20:26:15
问题 I got a problem with my application based on RefineryCMS 1.0.8 deployed on heroku. Heroku have a request timeout of 30 seconds. When uploading a file > 4MO through the RefineryCMS admin, it will sometimes take more than 30 seconds to perform the request (mostly because of the time needed to upload the file to s3). In this case, the dyno will be "frozen" and unresponsive for around 30 minutes (every request during this time end up by a H12 Error request timeout). This behaviour is exactly what

Missing requirement when using carrierwave and fog to upload file to S3

喜欢而已 提交于 2019-12-20 02:16:20
问题 I got this error Missing required arguments: aws_access_key_id, aws_secret_access_key . That seems weird because I already added carrierwave.rb in initializers folder. The access/secret key works perfectly when I use aws-sdk CarrierWave.configure do |config| config.fog_credentials = { provider: "AWS", aws_access_key_id: ENV["PUB-KEY"], aws_secret_access_key: ENV["SEC-KEY"] } config.fog_directory = ENV["mybucket"] end 回答1: Here's what my working one looks like: CarrierWave.configure do |config

rails + carrierwave + fog + S3 socket error

吃可爱长大的小学妹 提交于 2019-12-18 14:54:24
问题 I'm having this problem trying to use S3 services with fog and the Jquery File Upload (https://github.com/blueimp/jQuery-File-Upload) The error Excon::Errors::SocketError (getaddrinfo: nodename nor servname provided, or not known (SocketError)): This occur when i try to call "save" method in the controller. I'm setting carrierwave as follow: config/initializers/carrierwave.rb CarrierWave.configure do |config| config.fog_credentials = { :provider => 'AWS', :aws_access_key_id => 'access_key

AWS S3 403 Forbidden Error on newly created IAM inline policy for a new IAM user

血红的双手。 提交于 2019-12-12 05:08:24
问题 I have a brand new IAM user that I want to give upload & read access to my newly created bucket - myapp . This is the policy I am using for my user now: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetBucketLocation", "s3:ListAllMyBuckets" ], "Resource": "arn:aws:s3:::*" }, { "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::myapp" ] }, { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject" ], "Resource"

Image invalid on facebook/twitter user image uploading to S3

元气小坏坏 提交于 2019-12-12 04:33:16
问题 I'm trying to upload to amazon s3 an existing image on facebook or twitter from an user that has just signed up in my application, but some validation don't let me save the user object, throws: Image is invalid. I thought that was for my extension_white_list but I removed it and it's keeping saying Image is invalid. This it's not an error, it's just a message from a validation on carrierwave I think, even if the image url string is correct. AvatarUploader # encoding: utf-8 class

Uploads silently failing/pausing with new carrierwave_direct gem when uploading to s3

穿精又带淫゛_ 提交于 2019-12-11 17:14:29
问题 i am having a small problem uploading files to s3 with new carrierwave_direct gem I have followed the instructions for installing and setting up carrierwave_direct, however when i try to upload to s3, the upload begins and then pauses the upload at some point. Any thoughts? Also sometimes i get this message from s3: <Error> <Code>InvalidPolicyDocument</Code> <Message> Invalid Policy: Invalid 'expiration' value: '2011-09-13T07:52:58+02:00' </Message> <RequestId>"some id"</RequestId> <HostId>

How to create a 'fog of war' bitmap overlay in Android

主宰稳场 提交于 2019-12-11 10:06:20
问题 I have a simple 2D game with a handful of characters which move around the screen. I'd like to create a fog of war, whereby only the background around each character is visible. Hopefully that's clear (not too foggy?!?!). My thoughts were to create a black bitmap, then draw a 'transparent' disk centered on each of the characters. Then I can draw the background, draw the characters and finally draw this overlay bitmap over the top. Just not sure how to draw the 'transparent' disks on to the

HTTP 401 Fog::Storage::Rackspace::ServiceError

主宰稳场 提交于 2019-12-11 05:19:43
问题 i am working to get with Rails 4 / Ruby 2 fog / carrierwave integration. Basically I have in my app after around a day of the unicorn servers running it is returning: [HTTP 401] Fog::Storage::Rackspace::ServiceError I then query the server, and check if I can manually hit the server, and have no issues. So I am very lost and what to do. F, [2013-06-17T00:47:58.519007 #31200] FATAL -- : ActionView::Template::Error ([HTTP 401] Fog::Storage::Rackspace::ServiceError): 21: <li class="span4"> 22:

Find unassigned Elastic IPs

心已入冬 提交于 2019-12-10 19:41:56
问题 I'm trying to find all of the unassigned Elastic IPs using Fog, but it appears that the filtering in Fog::Compute::AWS::Addresses doesn't allow you to filter on empty values. For example, ips = Fog::Compute.new(credentials).addresses.all('domain' => 'vpc', 'instance-id' => '') returns an empty array, but ips = Fog::Compute.new(credentials).addresses.all('domain' => 'vpc').find_all {|eip| eip.server.nil? } results in the list I'm looking for. However, we have a large number of Elastic IPs, and

Carrierwave/fog/AWS issue when loading to Heroku “cannot load such file — fog”

一笑奈何 提交于 2019-12-10 16:49:15
问题 So im a total newbie and going through Michael Hartl's rails tutorial. Ive become totally stuck when trying to config picture uploads using carrierwave, fog-aws to S3 AWS. When pushing to heroku I get the following error: LoadError: cannot load such file -- fog As a side note i've tried using the exact same code in development mode, rails server works just fine and I am able to upload files to AWS successfully. So it's not a configuration setup problem with AWS. My problem comes when trying