Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7713421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:52:16+00:00 2026-06-01T01:52:16+00:00

I am having problems uploading images to Amazon S3. I have installed the paperclip

  • 0

I am having problems uploading images to Amazon S3. I have installed the paperclip gem and the gem ‘aws-s3’. My Amazon S3 server is the europen: http://s3-eu-west-1.amazonaws.com

When I submit my form the form is rendered again because the photographer is not saved. And I can see that nothing is uploaded to the cloud. And I get the message “Image ok” in view.

My controller:

def savenew
    @photographer = Photographer.create(params[:photographers]) 
    @photographer.sort_order = Photographer.count + 1

    if @photographer.save   
      redirect_to :action => 'list', :id => params[:id] 
    else    
      render 'create', :id => params[:id]             
    end                                 
end     

My model:

    attr_accessor :flv_file_size, :flv_updated_at, :flv_content_type, :image_file_size, :image_updated_at, :image_content_type,
    :quicktime_file_size, :quicktime_updated_at, :quicktime_content_type

  has_attached_file :image,
    :storage => :s3,
    :bucket => 'mybucket',
    :path => "/photographer/image/:id/:filename",
    :s3_credentials => {
      :access_key_id => 'mykey',
      :secret_access_key => 'mykey'
    }

  has_attached_file :flv,
    :storage => :s3,
    :bucket => 'mybucket',
    :path => "/photographer/flv/:id/:filename",
    :s3_credentials => {
      :access_key_id => 'mykey',
      :secret_access_key => 'mykey'
    }

      has_attached_file :quicktime,
    :storage => :s3,
    :bucket => 'mybucket',
    :path => "/photographer/quicktime/:id/:filename",
    :s3_credentials => {
      :access_key_id => 'mykey',
      :secret_access_key => 'mykey'
    }

My create page:

<h2>Movie</h2>

<h3>Create new movie</h3>

<%= link_to 'back to movie list', {:action => 'list', :id => params[:id]}, {:class => "margin-left"} %>

<div class="spacer">&nbsp;</div>
<%#= start_form_tag(:action => "savenew", :id => params[:id]) %>
<%= form_tag( {:action => "savenew", :id  => params[:id] },  :multipart => true ) do |f|%>
<%= render(:partial => "linkform", :object => @photographer) %>      



<p>
   <label for="submit">&nbsp;</label>
<%= submit_tag("create new") %>
</p>
<% end %>

My linkform:

<%=  javascript_include_tag "tiny_mce/tiny_mce" %>
<%=  javascript_include_tag "init_my_tiny_mce" %>
<p>
<label for="hyperlink:">name</label>
    <%= text_field("photographer", "name") %>
</p>

<p>
<label for="hyperlink:">text </label>
    <%= text_area("photographer", "text", :rows => 12) %>
</p>
<p>
<label for="hyperlink:">Upload/update image</label>
    <%= file_field("photographer", "image") %>
</p>

<% if @photographer %>
    <% if @photographer.image %>
    <p class="ok">
    <label for="dd">image ok</label>    
    <%= image_tag("/photographer/image/#{@photographer.id}/#{@photographer["image"]}", :size => "39x22" ) %>        
    </p>        
    <p>
        <label for="sdd">&nbsp;</label>
        <%= link_to("remove", {:action => "remove_image", :id => @photographer.id }, {:confirm => "Are your sure?"}) %>
    </p>
    <% else %> 
    <p  class="current">
    <label for="dd"></label>
    No image uploaded for movie
    </p>
    <% end %>
      <br />
 <% end %>     

<br /> 
<p>
<label for="hyperlink:">Upload/update flv</label>
    <%= file_field("photographer", "flv") %>
</p>
<br />
<% if @photographer %>
    <% if @photographer.flv %>
    <p class="ok">
    <label for="dd">flv: <%= @photographer["flv"]%></label>
    <%= link_to("remove", {:action => "remove_flv", :id => @photographer.id }, {:confirm => "Are your sure?"}) %>
    </p>        
    <% else %> 
    <p  class="current">    
    No flv uploaded 
    <br /><br />
    </p>
    <% end %>
<% end %>
<br /> 
<p>
<label for="hyperlink:">Upload/update quicktime</label>
    <%= file_field("photographer", "quicktime") %>                 
</p>
<br />
<% if @photographer %>
    <% if @photographer.quicktime %>    
    <p class="ok">
    <label for="dd">quicktime:  <%= @photographer["quicktime"]%></label>
    <%= link_to("remove", {:action => "remove_quicktime", :id => @photographer.id }, {:confirm => "Are your sure?"}) %>
    </p>
    <% else %> 
    <p  class="current">
    <label for="dd"></label>
    No quicktime uploaded 
    <br />
    </p>
    <% end %>
<% end %>
<%= error_messages_for("photographer")%>

My Rails console log:

Started POST "/admin/photographers/savenew" for 127.0.0.1 at 2011-09-21 23:32:40
 +0200
  Processing by Admin::PhotographersController#savenew as HTML
  Parameters: {"utf8"=>"Ô£ô", "authenticity_token"=>"LDd/jde1bzb7NqaNfzDKHjMc4j4
PHdjflgSYVGL3z+k=", "photographer"=>{"name"=>"sadasdasd", "text"=>"asd", "image"
=>#<ActionDispatch::Http::UploadedFile:0x59ad680 @original_filename="IT_T_rgb.jp
g", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\
"photographer[image]\"; filename=\"IT_T_rgb.jpg\"\r\nContent-Type: image/jpeg\r\
n", @tempfile=#<File:C:/Users/Iceberg/AppData/Local/Temp/RackMultipart20110921-6
200-o7ckpi>>}, "commit"=>"create new"}
  ←[1m←[36mSQL (0.0ms)←[0m  ←[1mBEGIN←[0m
  ←[1m←[35mSQL (1.0ms)←[0m  ROLLBACK
  ←[1m←[36mSQL (1.0ms)←[0m  ←[1mSELECT COUNT(*) FROM `photographers`←[0m
  ←[1m←[35mSQL (0.0ms)←[0m  BEGIN
  ←[1m←[36mSQL (0.0ms)←[0m  ←[1mROLLBACK←[0m
Rendered admin/photographers/_linkform.rhtml (5.0ms)
  ←[1m←[35mTextpage Load (1.0ms)←[0m  SELECT `textpages`.* FROM `textpages` ORDE
R BY name ASC
Rendered admin/photographers/create.rhtml within layouts/admin (105.0ms)
Completed 200 OK in 190ms (Views: 119.0ms | ActiveRecord: 3.0ms)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T01:52:17+00:00Added an answer on June 1, 2026 at 1:52 am

    The AWS-S3 gem works fine with European S3 buckets.

    If you add this to the enviroment.rb:

    AWS::S3::DEFAULT_HOST.replace "s3-eu-west-1.amazonaws.com"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been having lot of problems with users uploading images on my website.
Im having problems with classpaths. I have used them before with import but I'm
I'm having a very problematic error with phpthumb: http://phpthumb.gxdlabs.com/ So basically, I have a
I have a simple rails app and i use paperclip gem for my image
I'm writing a RESTful API. I'm having trouble with uploading images using the different
I've been having problems uploading my app to the app store. Every time I've
This is a site we've inherited from someone else. I'am having problems in uploading
I'm working on a web.py app for uploading files and im having real problems
I'm having problems in uploading a file using Rails and jQuery, I'm using attachment_fu
I am POSTing data to a server (images and string data). I have an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.