ImageWrite does not write to Amazon S3 bucket

Description

Hi,

I don't know if you can reproduce this error, but I want to mention it anyway. The following code can cause problems and does not give any error. But finally it does not upload an image to Amazon S3 bucket:

<cffile action="readBinary" file = "https://www.somedomain.nl/images/from_domain.jpg" variable="theImage">

<cfset variables.newImageUrl= "s3/amazon_bucket/to_s3.jpg">

<cfset variables.s3AccessKeyId = "SOMEID">
<cfset variables.s3AwsSecretKey = "SOMESECRETKEY">
<cfset variables.s3Access= "s3://#s3AccessKeyId#:#s3AwsSecretKey#@">
<cfset variables.destination="#variables.s3Access##variables.newImageUrl#">

<cfset ImageWrite(theImage, variables.destination,0.5,true)>

If you change the ImageWrite code for:

<cfimage source="#theImage#" action="write" destination="#variables.destination#" overwrite="yes">

It works and does upload the image to the Amazon bucket. Furthermore the code <cffile action="readBinary" file = "https://www.somedomain.nl/images/from_domain.jpg" variable="theImage"> is also necessary if substituted for e.g. imageRead then again it does not upload to the Amazon S3 bucket. The safest way is to use cffile and cfimage tags but they can be slower than the imageWrite and imageRead tags.

Regards,

Dick Goosen

Environment

None

relates to

Activity

Show:

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 4 September 2019 at 09:38
Updated 19 May 2021 at 10:20