Kentico 12.0.92 portal engine:
I'm trying to get an attachment stored in the database and attach it to an email. The file is attached to a standard kentico form using the upload file control. I see that the column @UploadFile@ is populated like this after my form gets submitted but if I try to do a GetFieldValue(@UploadFile@) it comes back null.In the database the UploadFile fields are formatted as such:66af607c-2fbc-4d8c-9880-3bf50b2959e8.png/db.png(that's an example).It seems like there are old answers on how to do this from around 2016 and older but none of them worked for me. I am trying to get the file specifically as a System.IO.Stream because I'm trying to attach it to an email. But really if anyone has any ideas on how to get the FileInfo object I can probably figure out how to convert it to a Stream. It's been a major challenge just to do something as simple as get an attachment. I can't believe it's this difficult; you'd think that this would be easy since what's the point of attaching something if you can't get it from the database?
↧