Tableau Download Versions [repack] -
useEffect(() => fetch( /api/tableau/versions?$new URLSearchParams(filters) ) .then(res => res.json()) .then(setVersions); , [filters]);
// 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); tableau download versions
const asset = version.assets.find(a => a.os === os); if (!asset) return res.status(404).json( error: 'Asset not found' ); useEffect(() => fetch( /api/tableau/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 ); ; checksum: asset.checksum_sha256 )
const versions = await prisma.tableau_versions.findMany( where, include: assets: true , orderBy: release_date: 'desc' , skip, take: parseInt(limit) );