src/properties/class-papi-property-file.php
protected function get_file_value( $value ) {
		$meta_key = $this->get_setting( 'meta_key' );

		if ( ! is_object( $value ) ) {
			return 0;
		}

		if ( empty( $meta_key ) ) {
			return $value->id;
		}

		if ( $value = get_post_meta( $value->id, $meta_key, true ) ) {
			return $value;
		}

		return 0;
	}
protected function get_file_value( $value ) {
		$meta_key = $this->get_setting( 'meta_key' );

		if ( ! is_object( $value ) ) {
			return 0;
		}

		if ( empty( $meta_key ) ) {
			return $value->id;
		}

		if ( $value = get_post_meta( $value->id, $meta_key, true ) ) {
			return $value;
		}

		return 0;
	}
Get matching value based on key from a file.

@param  mixed $value

@return mixed