Image files uploaded empty
-
Hi,
Short story: my developer does not respond anymore, I try to solve the problems myself.
This part should upload a ‘company’ CPT featured image but since March uplods an empty file instead.
My form fields:
[file companylogoupload id:logouploadfield class:logouploadfield limit:5MB filetypes:png|jpg] [text uploadtextfield id:uploadtextfield class:uploadtextfield placeholder "hoose file..."]The PHP which uploads it:
if (isset($data['uploadtextfield']) && $data['uploadtextfield']) { $files = $submission->uploaded_files(); $logoUpload = wp_upload_bits($data['uploadtextfield'], null, file_get_contents($files['companylogoupload']));This last line gives this PHP Error:
[29-Jun-2021 07:30:01 UTC] PHP Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /.../wp-content/themes/vallaltheme/functions.php on line 506I hope there’s a simple solution for this. Either to give the array field or convert it to string?
Can you help please?
ChampdorThe page I need help with: [log in to see the link]
The topic ‘Image files uploaded empty’ is closed to new replies.