Add a tiny bit of verbosity

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-05-14 19:43:22 +02:00
parent a63a3d990f
commit 4ccec057af
Signed by untrusted user: sam
GPG key ID: 4D8B07C18F31ACBD

View file

@ -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;
}