I am bringing some more code from my old OpenBlueDragon (and the code does work when I tested it, just in case there was a change on Amazon I missed).
I found this old thread on the forum:
Which it sounds like the issue I am having, but not quite sure. When I 1st set this bit of code up, I remember that the file had to go up in a binary format. And it seems that the implementation of cfhttp I was using already did the proper encoding to send to S3, so all I had to do was send the file:
As well as FileRead and ven a cffile readbinary, and cannot find any method that works.
So I am hoping someone knows the secret to sending this file in a way S3 can read it. But I am also wondering if this is just an issue because I do not have it in a cfscript format.
I am familiar with that repo. It uses a cfscript version of cfhttp. And it is sending it in the body as FileReadBinary(), which I am doing. As for the corruption, there is something within the file that is added (or removed). When you click the jpg, it downloads instead of shows in the browser, and after downloading, Windows Explorer says the file is not readable. The file sizes match when I try either method (OpenBlueDragon vs Lucee) but one is openable, the other is not.
I will run a test and upload the 2 files here later so they can be seen.
I went back and redid some of my tests thinking I might have overlooked something in all the different combos I did. It turns out, that indeed, sending the file via the body using FileReadBinary() worked. I guess I overloaded the browser cache so much it just started downloading the file vs just displaying it (normal behavior was displaying the file).
HOWEVER testing identical coding between OpenBlueDragon (~CF8) vs Lucee 6, the
I am not sure I am following what you are saying. I am trying to send a file via s3, like I used to vs using the body. If it is not possible with Lucee then it is not, I have it working with the Body now (which I could not do in OpenBlueDragon). And it is just another change to keep in mind when using Lucee.
After reading the fine print of PUT and POST, I think I see what my issue is. PUT uses the body tag for file contents and POST uses the file tag for file contents. It appears the my old cfml engine automagically put the file into the body.