[#42518161] Properly use dynamic workfile for attachments