HEX
Server: Apache/2.4.29 (Ubuntu)
System: Linux bareserver 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User: root (0)
PHP: 7.2.24-0ubuntu0.18.04.17
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/html/site/newsite/wp-content/plugins/jupiterx-core/includes/admin/options.php
<?php
/**
 * Add Jupiter X admin options.
 *
 * @package JupiterX_Core\Admin
 *
 * @since 1.9.0
 */

add_filter( 'upload_mimes', 'jupiterx_add_extra_mime_types' );

if ( ! function_exists( 'jupiterx_add_extra_mime_types' ) ) {
	/**
	 * Add more mime type.
	 *
	 * @since 1.9.0
	 *
	 * @param array $mimes Current array of mime types..
	 *
	 * @return array Updated array of mime types.
	 */
	function jupiterx_add_extra_mime_types( $mimes ) {

		if ( ! empty( jupiterx_get_option( 'svg_support' ) ) ) {
			$mimes['svg'] = 'image/svg+xml';
		}

		$mimes['zip'] = 'application/zip';

		return $mimes;
	}
}

add_filter( 'wp_check_filetype_and_ext', 'jupiterx_fix_filetype_check', 10, 4 );
/**
 * Fix the mime type filtering issue.
 *
 * @since 1.9.0
 *
 * @param array  $data file data.
 * @param string $file Full path to the file.
 * @param string $filename The name of the file (may differ from $file due to $file being in a tmp.
 * @param array  $mimes Key is the file extension with value as the mime type.
 * @return array Filetype data.
 *
 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
 */
function jupiterx_fix_filetype_check( $data, $file, $filename, $mimes ) {
	if ( ! empty( $data['ext'] ) && ! empty( $data['type'] ) ) {
		return $data;
	}

	$wp_filetype = wp_check_filetype( $filename, $mimes );

	if ( 'svg' === $wp_filetype['ext'] || 'svgz' === $wp_filetype['ext'] ) {
		$data['ext']  = $wp_filetype['ext'];
		$data['type'] = 'image/svg+xml';
	}

	return $data;
}