Issue with CMB2 plugin field type “file”

35 views Asked by At

I used below code for upload file from front end but when I update the form it disappear and not shown on the screen where I am displaying it. Can you help me? I would be very thankful for your valuable time.

array(
                        'name' => __('Upload Files', 'wp-job-board-pro'),
                        'id' =>  $prefix . 'upload_files',
                        'type' => 'file',
                        'options' => array(
                            'add_upload_file_text' => __('Add or upload files', 'wp-job-board-pro'),
                            'file_list' => true, // Enable multiple file uploads
                            'query_args' => array(
                                'type' => array('image/jpeg', 'image/png', 'application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'), // Specify allowed file types
                                'size' => 5242880, // Set maximum file size (5 MB in bytes)
                                'preview_size' => 'thumbnail',
                            ),
                        ),
                    )

I give my code and need help how i can save uploaded file. when i update my form after uploading my desire file then it will disappear automatically.

0

There are 0 answers