Skip to content

Commit

Permalink
fix: added .ai files to allowed upload mime types
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoreMihai committed May 28, 2024
1 parent b2dea34 commit 4fa2895
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion inc/files.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,13 @@ function ppom_upload_file() {

$file_name = apply_filters( 'ppom_uploaded_filename', $file_name );

$additional_mime_types = apply_filters( 'ppom_custom_allowed_mime_types', array( 'ai' => 'application/postscript' ) );

$allowed_mime_types = array_merge( get_allowed_mime_types(), $additional_mime_types );

/* ========== Invalid File type checking ========== */
$file_type = wp_check_filetype_and_ext( $file_dir_path . $file_name, $file_name );
$file_type = wp_check_filetype_and_ext( $file_dir_path . $file_name, $file_name, $allowed_mime_types );

$extension = $file_type['ext'];


Expand Down

0 comments on commit 4fa2895

Please sign in to comment.