espen / balder

Balder - Open source Ruby on Rails photo gallery
http://balderapp.com
MIT License
263 stars 97 forks source link

Be able to specify S3 bucket location #18

Open PolarFox opened 13 years ago

PolarFox commented 13 years ago

Upload fails with HTTP error and log file has a few lines that don't help me much. Only fails after upload is almost done(94-100%) might happen right after upload is "done".

Tried with 1.2.1 and git master... nginx passenger running the app ...

Started POST "/photos" for 87.100.142.22 at Sat Jul 16 00:49:12 +0300 2011 Processing by PhotosController#create as HTML Parameters: {"photo"=>{"album_id"=>"1"}, "name"=>"IMG_175056.jpg", "authenticity_token"=>"notsureshouldyouseethis?", "file"=>#<ActionDispatch::Http::UploadedFile:0xb669ad50 @original_filename="IMG_175056.jpg", @tempfile=#<File:/tmp/RackMultipart20110716-22434-1qezli1-0>, @headers="Content-Disposition: form-data; name=\"file\"; filename=\"IMG_175056.jpg\"\r\nContent-Type: image/jpeg\r\n", @content_type="image/jpeg">} Completed in 15ms

TypeError (can't convert nil into String): app/controllers/photos_controller.rb:77:in `create'

PolarFox commented 13 years ago

Might be worth closing... Wrong site in s3.rb .. balder defaults to us.. But still.. a bit error handling might do the trick.. ;)

espen commented 13 years ago

Hi, thanks for reporting and im glad you sorted it out. I'll look into error handling for this. Balder uses Carrierwave for upload which is using the Fog gem which default to 'us-east-1' for S3 (the current specification in s3.rb is irrelevant, it is purely for indicating that it can be changed)