File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -326,8 +326,16 @@ async fn process_job(job: Job) -> Result<()> {
326326 info ! ( "Creating WebDAV client..." ) ;
327327 let dav_client = WebDavClient :: new ( & job. webdav_config ) ?;
328328
329- info ! ( "Uploading processed video to: {}" , job. output_path) ;
330- match dav_client. upload_file ( & job. output_path , output_data) . await {
329+ // Extract just the filename from the full path for upload
330+ // output_path is like /remote.php/dav/files/jasper/VideoTest/test-2s_processed.mp4
331+ // We need just the filename: test-2s_processed.mp4
332+ let upload_filename = job. output_path
333+ . rsplit ( '/' )
334+ . next ( )
335+ . unwrap_or ( & job. output_path ) ;
336+
337+ info ! ( "Uploading processed video as: {} (from path: {})" , upload_filename, job. output_path) ;
338+ match dav_client. upload_file ( upload_filename, output_data) . await {
331339 Ok ( _) => info ! ( "Upload successful!" ) ,
332340 Err ( e) => error ! ( "Upload FAILED: {}" , e) ,
333341 }
You can’t perform that action at this time.
0 commit comments