Okay, It’s been almost a year and it’s time to revisit this. When I left
off I never got StoreSetMetaData() to work so we just starting using the
AWS SDK. But I really wanted to get Lucee to do this natively so I could
stop having to include a bunch of extra jar files in our .war deployment.
So, we upgraded to Lucee5 and upgraded to the latest S3 extension. The
function now exists meaning I no longer get a reference error when calling
StoreSetMetaData(). However, I believe it’s still not working correctly.
Below is some example code:
/*** assuming we set our S3 credentials in Application.cfc and the bucket
has the correct policy for downloads ***/
param name=“url.filename” default=“test.txt”;
myFile = “s3://mybucket/#url.filename#”;
fileWrite(myFile,“Sample s3 text”);
StoreSetMetadata(myFile,{
“Content-Type”:“text/plain”,
“Content-Disposition”:“download”
});
writeOutput(‘download’);
writeDump(StoreGetMetadata(myFile));
So… when I run this code in ACF11 it downloads fine and when I log into
S3 I can see permissions are changed. However, when I run this in Lucee5
the dump shows the meta data as being set but in S3 the permissions are not
actually changed and when I try to download it just takes me to the page
instead of downloading. Again, I’m not getting any errors anymore but it
doesn’t seem to actually be setting the Metadata on S3.On Sunday, January 17, 2016 at 2:30:15 AM UTC-7, Alex Skinner wrote:
Can you raise this on Jira if you haven’t already
Thanks
Alex
On 10 January 2016 at 07:39, Todd Kingham <toddk...@gmail.com <javascript:>> wrote:
I noticed that StoreSetMetaData() is unsupported in Lucee though it’s
been available in ACF since 9. I’m curious as to why it’s unsupported but
more importantly how can I set meta data? I suppose I could download the
AWS SDK but iit’s such a simple task and there is already so much
integration with S3 it seems like such a waste of effort to go through.
All I’m doing is creating a PDF on the fly using CFDOCUMENT and saving it
to S3 so it can be downloaded. Unfortunately, it’s default Content_Type is
“Application” and the PDF is useless as I can’t download it and I have
(seemingly) no built-in way to programmatically switch this to
“Application/pdf”. Am I overlooking something obvious or am I out of luck?
Thanks in advance
You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/bde42d81-64e0-41aa-8e8e-f4cfbf01f692%40googlegroups.com
https://groups.google.com/d/msgid/lucee/bde42d81-64e0-41aa-8e8e-f4cfbf01f692%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.
–
Alex Skinner
Managing Director
Pixl8 Interactive, 3 Tun Yard, Peardon Street, London
SW8 3HT, United Kingdom
T: +44 [0] 845 260 0726• W: www.pixl8.co.uk• E: in...@pixl8.co.uk
<javascript:>
Follow us on: Facebook http://www.facebook.com/pixl8 Twitter
http://www.twitter.com/pixl8 LinkedIn http://www.linkedin.com/pixl8
CONFIDENTIAL AND PRIVILEGED - This e-mail and any attachment is intended
solely for the addressee, is strictly confidential and may also be subject
to legal, professional or other privilege or may be protected by work
product immunity or other legal rules. If you are not the addressee please
do not read, print, re-transmit, store or act in reliance on it or any
attachments. Instead, please email it back to the sender and then
immediately permanently delete it. Pixl8 Interactive Ltd Registered in
England. Registered number: 04336501. Registered office: 8 Spur Road,
Cosham, Portsmouth, Hampshire, PO6 3EB