Exconn::Errors::SocketError in file upload via Carrierwave and Fog

后端 未结 2 1934
你的背包
你的背包 2021-01-25 12:19

This is a continuation of the problem I recently had - Stack Level Too Deep error - produced with strong parameters I think

Whenever I do a Post creation, w

相关标签:
2条回答
  • 2021-01-25 12:42

    I figured it out. What happened was I created a new user in AWS IAM for this app, and I didn't give that user proper credentials. i.e. I never created a security policy or assigned them to a group. So it was generating a 403 error.

    Now that I have fixed that, everything works smoothly.

    I hope this helps someone else.

    0 讨论(0)
  • 2021-01-25 12:53

    I think it might have to do with the locale after all.

    Here's an example of someone using s3, but it's the same idea. they say the following:

    I was recently working on my website and ran into a problem uploading larger files (like 1.8M) to S3 via Carrierwave/Fog. I was getting the following error: Excon::Errors::SocketError (Broken pipe (Errno::EPIPE)):

    What I found out was that the region code needed to be set in my carrierwave.rb initializer file in order to get the larger files uploaded. Apparently it defaults to some region code other than the one I was using and that for some reason leads to an error when uploading larger files.

    To find the region code, navigate through S3 to an actual file that has been stored and click on it and click “Properties” on the upper right of the screen. You will see something like the following as the link:

    https://s3-us-west-2.amazonaws.com/ginger2/uploads/web_developer_project_image/image/1/thumb_Screen_Shot_2013-09-05_at_2.10.45_PM.png

    In this case, the following is the region code you should set in your config: us-west-2

    0 讨论(0)
提交回复
热议问题