Transcode File Uploading

This commit is contained in:
Samuel Lorch 2024-06-23 03:30:08 +02:00
parent f232e08945
commit 36fe3202e8
7 changed files with 248 additions and 4 deletions

View file

@ -68,7 +68,13 @@ func RunTranscode(conf config.Config, t *types.Task, data types.TranscodeData) {
return
}
err = uploadFile(ctx, l, conf.Worker.Address, dst_path, t)
hash, err := hashFile(dst_path)
if err != nil {
l.ErrorContext(ctx, "Generating Hash", "err", err)
return
}
err = uploadFile(ctx, l, conf, dst_path, t, hash)
if err != nil {
l.ErrorContext(ctx, "File Upload Failed", "err", err)
return