Trouble Uploading with PHP
-
$profile_photo = "UPLOAD_DIR/photos/12345.jpg" $file_info = array( 'name' => ($profile_photo), 'type' => $wp_check_filetype['type'], 'tmp_name' => $profile_photo, 'error' => 0, 'size' => filesize($temp_file_path), ); $uploaded = UM()->uploader()->upload_image($file_info, $user_id, 'profile_photo');I’m having trouble with this code and I can’t get it to work, I keep getting an error saying it’s the incorrect mime type, but I’ve verified the mime type is being set to ‘image/jpeg’ and I don’t know why it’s not working. The photo is already on the server at this point, and I need to use the ultimate member uploader to get it to the user’s profile.
The topic ‘Trouble Uploading with PHP’ is closed to new replies.