In reply to: Daniel Krüger (Cosmo Consult)
HI Klaus,
according this post you could convert the base64 encoding to binary using SQL:
https://stackoverflow.com/questions/25897140/converting-from-base64-string-to-varbinarymax-in-sql-server
SELECT
Id,
AttachmentBase64, --the base64 value we want converted to varbinary
CAST(AttachmentBase64 AS xml).value('xs:base64Binary(.)', 'varbinary(max)') AS AttachmentBinary
FROM Attachments
In combination with the "special" feature of the add attachment action, you could add the picture as an attachment in the same instance.
SELECT convert(image,'0x') AS Content, 'file1.txt' AS FileName
https://docs.webcon.com/docs/2023R3/Studio/Action/Attachments/Action_AddAttachment
If you need to copy it to another attachment, I would opt for the API approach:
https://daniels-notes.de/posts/2023/copy-attachment-to-other-workflow
Best regards,
Daniel
Hi Daniel,
thanks a lot for the quick reply!
That looks rather easy (I have to admit I'm still working on understanding it) ;-)
Would it be possible to store the files (if I run directly from the SQL Management Studio) to a file share e.g. C:\Temp\ ?
Kind regards,
Klaus