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 9161035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:52:38+00:00 2026-06-17T13:52:38+00:00

I am trying to upload pictures to amazon S3. I was successful using carrierwave.

  • 0

I am trying to upload pictures to amazon S3. I was successful using carrierwave. Then I switched to jQuery multi image upload. Following railscast 383.

my upload_helper looks exactly as shown; except the initialize method.
https://github.com/railscasts/383-uploading-to-amazon-s3/blob/master/gallery-jquery-fileupload/app/helpers/upload_helper.rb

following is in the page that user can upload their pics:

    = s3_uploader_form post: items_url, as: "painting[image_url]" do
        = file_field_tag :file, multiple: true

    %script#template-upload{type: "text/x-tmpl"}
        .upload
            {%=o.name%}
            .progress
                .bar{ style: "width: 0%" }

I have the following js too:

//= require jquery-fileupload/basic
//= require jquery-fileupload/vendor/tmpl
//= require paintings

as it was shown in the tutorial

Even though my S3 upload was working fine with carrierwave and single file upload I am getting

failed to upload image error (coming from the last line in paintings.js.coffee). and 
Failed to load resource: the server responded with a status of 400 (Bad Request)

<Error>
    <Code>AccessDenied</Code>
    <Message>Access Denied</Message>
    <RequestId>XYZ</RequestId>
    <HostId>
        XYZ
    </HostId>
</Error>

my CORS configuration is:

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration>
    <CORSRule>
        <AllowedOrigin>http://localhost:3000</AllowedOrigin>
        <AllowedMethod>GET</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <MaxAgeSeconds>3000</MaxAgeSeconds>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>

Any guidance is very much appreciated

  • 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-17T13:52:40+00:00Added an answer on June 17, 2026 at 1:52 pm

    Found it!!!

    In the upload_helper > S3Uploader > initialze add a timezone to your ‘expiration:’ like this:

        expiration: 10.hours.from_now.utc,
    

    That did the magic for me

    Good luck

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to upload an image using django and following a tutorial from
I'm trying to get a simple file upload working using jquery-fileupload-rails carrierwave fog I
I'm trying to upload pdf files in the server. And i;m using the following
Hi i'm trying to upload an image using a php script. And whats really
I'm trying to upload pictures to a folder (located in my project folder) using
I am trying to upload pictures on the wall of Facebook using Android platform.
So I'm trying to upload a document to a sharepoint site using a Java
I'm trying to upload files to the blobstore in my Google App without using
So apparently I'm trying to do something that jQuery does not like. I'm using
I'm trying to upload a picture to a specific website using php cURL but

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.