fileUpload for S3 broken

Description

fileUpload() and <cffile action="upload"> are silently failing for S3 virtual file systems.

This will seemingly break out of a <script> block seemingly entirely. It skips my writeOutput() and writeDump() methods and goes straight to the proceeding HTML:

uploadFile = fileUpload( 's3://my-test', 'form.imageFile' );
writeDump(uploadFile);

This will dump out what appears to be a successful upload in the uploadFile variable dump:

<cffile action="upload" destination="s3://my-test/" filefield="form.imageFile" result="uploadFile">
<cfdump var="#uploadFile#">

The keys were set in application.cfc via:

<cfcomponent>
<cfset this.s3.accessKeyId="{key}">
<cfset this.s3.awsSecretKey = "{secret}">
</cfcomponent>

This code works just fine in Adobe ColdFusion 2016.

I noticed that if I change the S3 path to something that doesn't exist, the same silent failure occurs.

No files ever make it to the S3 bucket.

This has been confirmed on multiple machines running CommandBox. My current Java Version is 1.8.0_202 via AdoptOpenJdk 64bit.

Environment

Windows 10
CommandBox 4.7.0

Activity

Show:

Jamie Jackson 26 July 2022 at 19:41
Edited

I wasn’t sure if this was the same issue or not since I’m using fileWrite and not fileUpload, but this gets into the root cause of why Lucee behaves strangely with fileWrite: LDEV-4100

, I see you’re on this thread, too. I ran into this issue while trying to configure Mura to use S3, then boiled it down to a simplified, non-Mura test case.

Zac Spitzer 19 May 2021 at 09:05

somewhat related issue raised on the mailing list, relating to permissions. buckets which work with ACF fail with Lucee

https://dev.lucee.org/t/writing-to-s3-bucket/7592

A Martin 15 December 2020 at 16:51
Edited

I am also unable to run the below code. I get an “Access Denied” response. I am able to run s3write and directoryListusing the same bucket/credentials. If I move the code over to Adobe CF then i no longer get “Access Denied” with identical code. If I open the bucket to full public rights then it allows the fileUpload to run successfully.

uploadFile = fileUpload( 's3://bucket-name', 'form.imageFile' ); 

Lucee 5.3.7.47
0.9.4.124-SNAPSHOT

Pothys - MitrahSoft 14 September 2020 at 12:25

, Any update on this issue?
please check with latest version if possible and report here back.

Christopher Tierney 8 September 2020 at 18:44

just seeing this. My role has changed in the organization and I’m not sure when I’d be able to spin up a test for this. probably has a good point on the ACL. They could have been wrong. But I would have expected to see a permissions error then as well. Thanks for all your hard work on Lucee items.

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

Sprint

Created 25 June 2019 at 21:10
Updated 26 July 2022 at 19:42

Flag notifications