add download option on clips and snapshots

This commit is contained in:
Jason Hunter
2021-07-11 20:42:23 -04:00
committed by Blake Blackshear
parent 1181620f33
commit 2fbfbf614b
2 changed files with 26 additions and 6 deletions

View File

@@ -127,10 +127,20 @@ export default function Event({ eventId }) {
onReady={(player) => {}}
/>
<div className="text-center">
<Button className="mx-2" color="blue" href={`${apiHost}/api/events/${eventId}/clip.mp4`} download>
<Button
className="mx-2"
color="blue"
href={`${apiHost}/api/events/${eventId}/clip.mp4?download=true`}
download
>
<Clip className="w-6" /> Download Clip
</Button>
<Button className="mx-2" color="blue" href={`${apiHost}/clips/${data.camera}-${eventId}.jpg`} download>
<Button
className="mx-2"
color="blue"
href={`${apiHost}/api/events/${eventId}/snapshot.jpg?download=true`}
download
>
<Snapshot className="w-6" /> Download Snapshot
</Button>
</div>