Plugin

Developer
Supported

CE Image

ExpressionEngine 1.x, ExpressionEngine 2, ExpressionEngine 3

Back to this add-on's main page
View Other Add-ons From Causing Effect

1 of 2
1
   

You must be logged in to post.

There was a problem uploading your file to AWS

Support (Resolved)

David Logan
David Logan

Hi there

We’ve bought your plugin to replace shj_imgmodifier as we’re upgrading from EE1 to EE2.

I’ve used the plugin to pull the local image in fine but when I try and save the cached image to our S3 bucket I get no src in my image tag.

Here’s the debug info from EE:

(2.720988 / 28.19MB)        Calling Class/Method: Ce_img/pair
(2.721094 / 28.19MB)        -> Class Called: Ce_img
(2.721120 / 28.19MB)        -> Method Called: pair
(2.722353 / 28.23MB)        ***  CE Image debug: Base path: ‘/Users/jonnyfrodsham/Sites/swimming/swimming.org/media/application-storage/’
(2.722367 / 28.23MB)        ***  CE Image debug: Source image: ‘/assets/uploads/headline/liam_serious.jpg’, Fallback image: ‘’
(2.722375 / 28.23MB)        ***  CE Image debug: The image ‘/Users/jonnyfrodsham/Sites/swimming/swimming.org/media/application-storage/images/made/assets/uploads/headline/liam_serious_526_297_c1.jpg’ is cached.
(2.722910 / 28.22MB)        Calling Extension Class/Method: Ce_img_aws_ext/pre_parse
(3.384365 / 28.23MB)        ***  CE Image - AWS debug: There was a problem uploading your file to AWS.
(3.384664 / 28.20MB)        -> Data Returned
(3.385041 / 28.20MB)        Calling Class/Method: Entry_url/
(3.385122 / 28.20MB)        -> Class Called: Entry_url
(3.385888 / 28.20MB)        -> Method Called: Entry_url
(3.385988 / 28.20MB)        -> Data Returned
(3.386065 / 28.20MB)        Calling Class/Method: Ce_img/pair
(3.386175 / 28.20MB)        -> Class Called: Ce_img
(3.386201 / 28.20MB)        -> Method Called: pair
(3.386380 / 28.21MB)        ***  CE Image debug: Source and fallback source cannot both be blank.

I’ve enabled the extension and added my config settings as per documentation.

I originally had dashes in the bucket name but removed them when I saw another post with the same problem.

Here’s my tag call in the template:

{exp:ce_img:pair src=”{main_image}” crop=“yes” max_width=“689” max_height=“297” bucket=“britishswimmingcmsmigrationtest” cache=“yes”}
          {aws_url}
          {/exp:ce_img:pair}

Hope you can be of help.

I’m working locally also.

Regards
Jonny

Causing Effect - Aaron Waldon
# 1
Developer
Causing Effect - Aaron Waldon

Hi David!

Does the server (your local dev machine in this case) meet the requirements to use CE Image with Amazon S3?

David Logan
# 2
David Logan

Hi cheers for getting back

I’m running php 5.3 and cURL is enabled and we have an amazon s3 account and bucket set up.


cURL support enabled
cURL Information 7.24.0
Age 3
Features
AsynchDNS Yes
Debug No
GSS-Negotiate Yes
IDN No
IPv6 Yes
Largefile Yes
NTLM Yes
SPNEGO No
SSL Yes
SSPI No
krb4 No
libz Yes
CharConv No
Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp
Host x86_64-apple-darwin12.0
SSL Version OpenSSL/0.9.8r
ZLib Version 1.2.5

David Logan
# 3
David Logan

I’ve tested cURL on my local environment and I’m able to post and retrieve data to and from my online server.

David Logan
# 4
David Logan

Hi Aaron

I’ve done a little more testing and returned the following error from your Ce_s3.php script:

array(2) { [“code”]=> string(18) “InvalidAccessKeyId” [“message”]=> string(65) “The AWS Access Key Id you provided does not exist in our records.” }

I don’t know if this makes any difference but our bucket location is:

Bucket location: eu-west-1

Cheers
Jonny

Causing Effect - Aaron Waldon
# 5
Developer
Causing Effect - Aaron Waldon

Hi David!

That error message leads me to believe that the AWS key or secret key that were entered in the config are incorrect. Can you log into your AWS control panel and make sure that the settings match what you are using in your config file?

David Logan
# 6
David Logan

Hi Aaron

Yes they’re correct. I’m able to connect to the s3 account with cyberduck using those settings. It seems like it’s something to with the bucket prefix?

Cheers
Jonny

Causing Effect - Aaron Waldon
# 7
Developer
Causing Effect - Aaron Waldon

The S3 class that CE Image uses is a modified third-party library. I know that people in the past have had problems if they have dashes or underscored in the bucket name. I recommend creating a bucket without any dashes or underscores to see if that resolves the issue.

Please let me know what you find out!

David Logan
# 8
David Logan

Yes I did that already as I saw you mentioned this in another post. Our bucket name is just lowercase characters.

Causing Effect - Aaron Waldon
# 9
Developer
Causing Effect - Aaron Waldon

Hmm, the debug message says your key (or maybe your secret key) is invalid. If you would like, I can test out the credentials. You can email me at software at causingeffect dot com. If they work for me, there may be another server issue. If they don’t, then there is a good chance that your key, secret key, or bucket name are incorrect.

The other thing to check is that your bucket is readable and writable. If authenticated users cannot read or write to the bucket, then it probably won’t work either…

David Logan
# 10
David Logan

The bucket is readable and writeable yes. I don’t think I’ll be able to send my bucket details over.

Cheers for all the help, I’ll let you know if I find a solution, I may look at a more recent S3 library when I have time.

Causing Effect - Aaron Waldon
# 11
Developer
Causing Effect - Aaron Waldon

Fair enough. The library works fine, because I use it (and a lot of other people do too).

You can also easily regenerate your key and secret key after I test it out. I’m just curious whether or not that is the issue…

David Logan
# 12
David Logan

Yeah we’ve tried a number of times regenerating etc.

Cyberduck is working fine with the credentials. Very weird we think it may be the region, but could be permission on the bucket.

Whatever happens I’ll email you and let you know.

Cheers
Jonny

David Logan
# 13
David Logan

Just a quick note Aaron to say that I’m using ASSETS to upload images to S3 and it’s working fine with the same credentials.

I’ve noticed they’re using the same library by Donovan Sch√∂nknecht but a newer version, I’m going to try this library with your plugin today possibly will let you know how I go on.

Causing Effect - Aaron Waldon
# 14
Developer
Causing Effect - Aaron Waldon

Awesome. Please let me know what you find out.

David Logan
# 15
David Logan

Hi Aaron

I simply don’t have the time to update to the latest version Donovan Sch√∂nknecht library. Could I add it as a request for CE Image. I’m certain its the issue as assets works perfectly and uploads to the desired folder etc and the only difference is they are using the later version which I think sorts the eu issue and creates the correct upload url.

Regards
Jonny

1 of 2
1