Skip to content

Commit

Permalink
File upload fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zahardev committed Oct 16, 2024
1 parent 27cfc21 commit 2c04d20
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions assets/js/fileupload.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ jQuery( document ).ready( function ( $ ) {
var file = response.file,
fileName = up.files[0].name;

$( "#podmotor_file_id" ).val( file.id );
$( "#filesize_raw" ).val( file.file_size );
$( "#filesize" ).val( plupload.formatSize( file.file_size ) );
$( "#duration" ).val( file.file_duration );
$( '#upload_audio_file' ).val( file.file_path );
$( "#podmotor_file_id" ).val( file.id ).trigger('change');
$( "#filesize_raw" ).val( file.file_size ).trigger('change');
$( "#filesize" ).val( plupload.formatSize( file.file_size ) ).trigger('change');
$( "#duration" ).val( file.file_duration ).trigger('change');
$( '#upload_audio_file' ).val( file.file_path ).trigger('change');
$( '.peek-a-bar' ).fadeOut( 5000 );
$('#castos_file_data').val(JSON.stringify({
path: file.file_path,
Expand Down
1 change: 0 additions & 1 deletion src/components/EpisodeSyncStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ const EpisodeSyncStatus = () => {

// Check if the specified post type exists in the fetched data
if (types[postType] && types[postType].rest_base) {
console.log('Returning rest base:', types[postType].rest_base);
return types[postType].rest_base;
} else {
console.warn(`Post type "${postType}" not found.`);
Expand Down
2 changes: 1 addition & 1 deletion templates/metafields/episode_file.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<div>
<input name="<?php echo esc_attr( $k )
?>" type="text" class="ssp-sync ssp-field-<?php echo esc_attr( $k )
?>" type="text" id="upload_<?php echo esc_attr( $k ) ?>" class="ssp-sync ssp-field-<?php echo esc_attr( $k )
?>" value="<?php echo esc_attr( $data )
?>" />

Expand Down

0 comments on commit 2c04d20

Please sign in to comment.