' . esc_html( $file_name ) . ''
),
),
30
);
} catch ( \Aws\Exception\AwsException $e ) {
$this->logger->s3_operation( 'deleteObject', false, $file_name, $e->getAwsErrorMessage() ?? '' );
set_transient(
'idrivee2_test_result',
array(
'type' => 'error',
'message' => sprintf(
/* translators: %s is the error message from AWS. */
__( 'AWS Error: %s', 'idrivee2-media-upload' ),
$e->getAwsErrorMessage() ?? __( 'Unknown error', 'idrivee2-media-upload' )
),
),
30
);
} catch ( \Exception $e ) {
$this->logger->error( 'Test file deletion failed: ' . $e->getMessage() );
set_transient(
'idrivee2_test_result',
array(
'type' => 'error',
'message' => sprintf(
/* translators: %s is the error message. */
__( 'Error: %s', 'idrivee2-media-upload' ),
$e->getMessage()
),
),
30
);
}
wp_safe_redirect( admin_url( 'options-general.php?page=idrivee2-media-upload' ) );
exit;
}
/**
* Sanitize settings before saving.
*
* @since 0.3.0
*
* @param array