Title: [Plugin: Developer&#039;s Custom Fields] Upload file not saving
Last modified: August 20, 2016

---

# [Plugin: Developer's Custom Fields] Upload file not saving

 *  [Dinesh Kesharwani](https://wordpress.org/support/users/cyberwani/)
 * (@cyberwani)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-developers-custom-fields-upload-file-not-saving/)
 * I am using Developer’s Custom Field with custom post to set before-after images.
   Herewith listed my code. But when i select image and update the post. But, it
   is nat saving the uploaded images. And, displaying blank.
 *     ```
       function register_my_custom_fields() {
       	slt_cf_register_box( array(
       		'type'		=> 'post',
       		'title'		=> 'Before After images',
       		'id'		=> 'before-after-images',
       		'context'	=> 'normal',
       		'priority'	=> 'high',
       		'fields'	=> array(
       			array(
       				'name'			=> 'before_image',
       				'label'			=> 'Before Image',
       				'type'			=> 'file',
       				'scope'			=> array( 'beforeafter' ),
       				'capabilities'	=> array( 'edit_posts' ),
       				'preview_size'	=> 'thumbnail',
       				'file_button_label'	=> 'Select Before Image',
       			),
       			array(
       				'name'			=> 'after_image',
       				'label'			=> 'After Image',
       				'type'			=> 'file',
       				'scope'			=> array( 'beforeafter' ),
       				'capabilities'	=> array( 'edit_posts' ),
       				'preview_size'	=> 'thumbnail',
       				'file_button_label'	=> 'Select After Image',
       			)
       		)
       	));
       }
       ```
   
 * any solutions????
 * [http://wordpress.org/extend/plugins/developers-custom-fields/](http://wordpress.org/extend/plugins/developers-custom-fields/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Steve Taylor](https://wordpress.org/support/users/gyrus/)
 * (@gyrus)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-developers-custom-fields-upload-file-not-saving/#post-2268474)
 * Could you clarify, is `beforeafter` a custom post type?
 * I can’t see any obvious problem with the above code. If you set `WP_DEBUG` to`
   true` in `wp-config.php`, do you see any errors?

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Developer's Custom Fields] Upload file not saving’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/developers-custom-fields.svg)
 * [Developer's Custom Fields](https://wordpress.org/plugins/developers-custom-fields/)
 * [Support Threads](https://wordpress.org/support/plugin/developers-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/developers-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/developers-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/developers-custom-fields/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Steve Taylor](https://wordpress.org/support/users/gyrus/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-developers-custom-fields-upload-file-not-saving/#post-2268474)
 * Status: not resolved