Access Images from Forms File Upload in Custom Workflow
I've created a custom forms workflow to save submissions for a particular form to an external database. One of the columns in that database is a user icon in Base64 string format. I followed the steps to create the workflow type and all non-images fields save correctly. The problem is the image file upload field. When I get the value for the icon image field (using context.Record.GetRecordFieldByAlias("myalias")) I see that it's the media path "/media/forms/upload/form_227751f3-6756-401a-a5af-ec7c458fae1f/8451990e-d83c-4aef-819e-8bacee1933f5/chickadee.png". How do I get that media item using that path so that I can save the icon image to the external database?
I got too deep into trying to do this through umbraco utilities that I missed the easy solution right in front of me. I have the relative URI of the image which is stored in wwwroot so I was able to use that to do regular file I/O and convert that image to base64.
Access Images from Forms File Upload in Custom Workflow
I've created a custom forms workflow to save submissions for a particular form to an external database. One of the columns in that database is a user icon in Base64 string format. I followed the steps to create the workflow type and all non-images fields save correctly. The problem is the image file upload field. When I get the value for the icon image field (using context.Record.GetRecordFieldByAlias("myalias")) I see that it's the media path "/media/forms/upload/form_227751f3-6756-401a-a5af-ec7c458fae1f/8451990e-d83c-4aef-819e-8bacee1933f5/chickadee.png". How do I get that media item using that path so that I can save the icon image to the external database?
I got too deep into trying to do this through umbraco utilities that I missed the easy solution right in front of me. I have the relative URI of the image which is stored in wwwroot so I was able to use that to do regular file I/O and convert that image to base64.
can you share your code here?
Below is the function I use to process the images from the form, where path is context.Record.GetRecordFieldByAlias("imageAlias").ValuesAsString().
is working on a reply...