forked from sam/cytube-json-generator
Add a tiny bit of verbosity
Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
parent
a63a3d990f
commit
4ccec057af
1 changed files with 2 additions and 0 deletions
|
@ -157,6 +157,7 @@ async function ffprobe(videoFile: string): Promise<Record<string, unknown>> {
|
|||
* @returns the URL of the uploaded file directly
|
||||
*/
|
||||
async function upload(location: string): Promise<string> {
|
||||
console.log(`Uploading ${location}, this will take time...`);
|
||||
const file = await Deno.open(location, { read: true });
|
||||
const stream = readableStreamFromReader(file);
|
||||
|
||||
|
@ -174,6 +175,7 @@ async function upload(location: string): Promise<string> {
|
|||
const jsondata = await res.json().catch(() => {
|
||||
Deno.exit(1);
|
||||
});
|
||||
console.log(`Successfully uploaded ${location} to ${jsondata.url}.\n`);
|
||||
return jsondata.direct_url;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue