Skip to content

Commit 5bb43e1

Browse files
authored
Merge pull request #5 from cloudinary-devs/transcript_chapters
Add links to download the transcript and chapters files
2 parents feeb6f4 + e936337 commit 5bb43e1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

upload/tutorial-uploads.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ <h1>Tutorial Uploads</h1>
1313
<button id="upload_widget" class="cloudinary-button">Upload Video</button>
1414
<p id="thanks"></p>
1515
<p id="publicId"></p>
16+
<p><a id="transcript" href=""></a></p>
17+
<p><a id="chapters" href=""></a></p>
1618
</div>
1719

1820
<script type="text/javascript">
@@ -34,6 +36,16 @@ <h1>Tutorial Uploads</h1>
3436
// Extract and display the public ID
3537
document.getElementById("thanks").innerText = "Thank you!";
3638
document.getElementById("publicId").innerText = `Public ID: ${result.info.public_id}`;
39+
40+
let transcriptUrl = `https://cloudinary-res.cloudinary.com/raw/upload/${result.info.public_id}.transcript`;
41+
let chaptersUrl = `https://cloudinary-res.cloudinary.com/raw/upload/${result.info.public_id}-chapters.vtt`;
42+
43+
document.getElementById("transcript").href = `${transcriptUrl}?response-content-disposition=attachment`;
44+
document.getElementById("transcript").innerText = transcriptUrl;
45+
46+
document.getElementById("chapters").href = `${chaptersUrl}?response-content-disposition=attachment`;
47+
document.getElementById("chapters").innerText = chaptersUrl;
48+
3749
}
3850
});
3951

0 commit comments

Comments
 (0)