Skip to content

Commit

Permalink
FC-3061 Lucee 5 S3 extension compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
justincarter committed Feb 10, 2016
1 parent 14c89c2 commit f413ab5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/cdn/s3.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,13 @@
</cfif>

<cftry>
<cfset putObject(config=arguments.dest_config,file=dest_file,localfile=arguments.source_localpath) />

<cfif structKeyExists(server, "lucee") AND listFirst(server.lucee.version, ".") gte 5>
<cffile action="write" output="#fileReadBinary(arguments.source_localpath)#" file="#getS3Path(config=arguments.dest_config,file=arguments.dest_file)#">
<cfelse>
<cfset putObject(config=arguments.dest_config,file=dest_file,localfile=arguments.source_localpath) />
</cfif>

<cfset updateACL(config=arguments.dest_config,file=dest_file) />

<cfcatch>
Expand Down Expand Up @@ -692,7 +698,13 @@
</cfif>

<cftry>
<cfset putObject(config=arguments.dest_config,file=dest_file,localfile=arguments.source_localpath) />

<cfif structKeyExists(server, "lucee") AND listFirst(server.lucee.version, ".") gte 5>
<cffile action="write" output="#fileReadBinary(arguments.source_localpath)#" file="#getS3Path(config=arguments.dest_config,file=arguments.dest_file)#">
<cfelse>
<cfset putObject(config=arguments.dest_config,file=dest_file,localfile=arguments.source_localpath) />
</cfif>

<cfset updateACL(config=arguments.dest_config,file=dest_file) />

<cfcatch>
Expand Down

0 comments on commit f413ab5

Please sign in to comment.