Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit f5cd827

Browse files
authored
Merge pull request #96 from rtMediaWP/fix/wp-media-file
Fix replacement of attachment file url after transcoding file
2 parents 6a0ef64 + 13613ab commit f5cd827

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

admin/rt-transcoder-handler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,8 +870,9 @@ public function add_transcoded_files( $file_post_array, $attachment_id, $job_for
870870

871871
$uploaded_file = _wp_relative_upload_path( $upload_info['file'] );
872872

873-
if ( $uploaded_file ) {
873+
if ( ! empty( $uploaded_file ) ) {
874874
$transcoded_files[ $key ][] = $uploaded_file;
875+
update_post_meta( $attachment_id, '_wp_attached_file', $uploaded_file );
875876
}
876877
} else {
877878
$flag = esc_html__( 'Could not read file.', 'transcoder' );

0 commit comments

Comments
 (0)