updated version with base64 file action support