Ecommerce Shopify WordPress Discussion

why can't I see the file from carbon fields?

The problem is the following, I use wordpress and make my own theme. I want to make a custom field using carbon fields, into which I can upload a file and after saving the record, this file should be placed in the folder I need, but when I started looking for errors and arranging logs, I found out the following: I fill in the fields and upload the file to my custom field, then click save and in the logs I see a message that the file did not have any data, I started checking and it turned out that he just did not see it, he could not download it from my field. Why is this happening? add_action('carbon_fields_register_fields', 'crb_attach_post_meta'); function crb_attach_post_meta() { Container::make('post_meta', __('add a', 'crb')) ->where('post_type', '=', 'post') ->add_fields(array( Field::make('text', 'crb_g_title', 'title '), Field::make('text', 'crb_additional_seo_g', 'SEO'), Field::make('text', 'crb_additional_about_g', 'about'), Field::make('text', 'crb_additional_c', 'Con'), Field::make('file', 'crb_g_files', 'load file') ->set_required(true) ->set_help_text('loadfile'), )); } add_action('save_post', 'crb_save_post', 10, 3); function crb_save_post($post_id, $post, $update) { if (empty($_FILES['crb_g_files'])) { error_log(" i have file load error"); return; } }
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.