!!link!! - Tableau Download Versions

res.json( data: versions, page, limit ); }); router.get('/versions/:id/download', async (req, res) => const id = req.params; const os = req.query; const version = await prisma.tableau_versions.findUnique( where: id , include: assets: true );

return ( <div className="p-6"> <h1 className="text-2xl font-bold mb-4">📊 Tableau Version Archive</h1> <div className="flex gap-4 mb-6"> <select onChange=e => setFilters(...filters, product: e.target.value)> <option>Desktop</option><option>Server</option><option>Reader</option> </select> <select multiple onChange=e => setFilters(...filters, os: [...e.target.selectedOptions].map(o => o.value))> <option value="Windows">Windows</option><option value="macOS">macOS</option> </select> </div> <table className="w-full border"> <thead><tr><th>Version</th><th>Release Date</th><th>OS</th><th>Actions</th></tr></thead> <tbody> versions.map(v => ( <tr key=v.id> <td>v.version_string</td> <td>v.release_date</td> <td>v.assets.map(a => a.os).join(', ')</td> <td> v.assets.map(asset => ( <button key=asset.os onClick=() => handleDownload(v, asset.os) className="bg-blue-500 text-white px-2 py-1 mr-2 rounded"> Download for asset.os </button> )) </td> </tr> )) </tbody> </table> </div> ); tableau download versions

// Optional: generate signed URL if using S3 res.json( download_url: asset.download_url, checksum: asset.checksum_sha256 ); ); // TableauVersions.jsx import useState, useEffect from 'react'; export default function TableauVersions() const [versions, setVersions] = useState([]); const [filters, setFilters] = useState( product: 'Desktop', os: [], status: 'active' ); const [selectedVersion, setSelectedVersion] = useState(null); res.json( data: versions

const handleDownload = async (version, os) => const res = await fetch( /api/tableau/versions/$version.id/download?os=$os ); const download_url, checksum = await res.json(); window.open(download_url, '_blank'); alert( Download started. SHA256: $checksum ); ; const id = req.params

// Log download for analytics await prisma.download_log.create( data: version_id: id, os, user_ip: req.ip, downloaded_at: new Date() );