src/properties/class-papi-property-file.php
public function update_value( $values, $slug, $post_id ) {
		if ( ! is_array( $values ) ) {
			$values = $this->get_file_value( (object) [
				'id' => $values
			] );

			if ( empty( $values ) ) {
				return;
			}

			return $values;
		}

		foreach ( $values as $index => $value ) {
			if ( ! is_numeric( $value ) ) {
				continue;
			}

			$values[$index] = $this->get_file_value( (object) [
				'id' => $value
			] );
		}

		return array_filter( $values );
	}
public function update_value( $values, $slug, $post_id ) {
		if ( ! is_array( $values ) ) {
			$values = $this->get_file_value( (object) [
				'id' => $values
			] );

			if ( empty( $values ) ) {
				return;
			}

			return $values;
		}

		foreach ( $values as $index => $value ) {
			if ( ! is_numeric( $value ) ) {
				continue;
			}

			$values[$index] = $this->get_file_value( (object) [
				'id' => $value
			] );
		}

		return array_filter( $values );
	}
Save file with a meta value or id.

@param  mixed  $values
@param  string $slug
@param  int    $post_id

@return string