Skip to content

Commit

Permalink
Added - Support for image upload
Browse files Browse the repository at this point in the history
  • Loading branch information
deepench committed Sep 4, 2024
1 parent 97f72bf commit 643402f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/abstracts/class-evf-form-fields-upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ public function remove_csv_file_after_email_send( $attachment, $entry, $form_dat
unlink( $meta_value );
}

if ( isset( $meta_value['type'] ) && 'file-upload' === $meta_value['type'] && isset( $meta_value['value_raw'] ) ) {
if ( isset( $meta_value['type'] ) && ( 'file-upload' === $meta_value['type'] && isset( $meta_value['value_raw'] ) || 'image-upload' === $meta_value['type'] && isset( $meta_value['value_raw'] ) ) ) {
foreach ( $meta_value['value_raw'] as $file_data ) {
if ( isset( $file_data['value'] ) ) {
$file_url = $file_data['value'];
Expand Down Expand Up @@ -1430,7 +1430,7 @@ public function attach_entry_files_upload( $entry ) {
if ( file_exists( $meta_value ) ) {
$entry_files[] = $meta_value;
}
} elseif ( isset( $meta_value['type'] ) && 'file-upload' === $meta_value['type'] && isset( $meta_value['value_raw'] ) ) {
} elseif ( isset( $meta_value['type'] ) && ( 'file-upload' === $meta_value['type'] && isset( $meta_value['value_raw'] ) || 'image-upload' === $meta_value['type'] && isset( $meta_value['value_raw'] ) ) ) {
foreach ( $meta_value['value_raw'] as $file_data ) {
if ( isset( $file_data['value'] ) ) {
$file_url = $file_data['value'];
Expand Down

0 comments on commit 643402f

Please sign in to comment.