public function addFiles($files, $type = '', $locale = null, $keepOriginal = false): void
    {
        $files  = (array) $files;
        $locale = $this->normalizeLocaleString($locale);

        if (is_string(array_values($files)[0])) {
            foreach ($files as $filename => $file) {
                $this->addFile($file, $type, $locale, $filename, $keepOriginal);
            }
        } else {
            foreach ($files as $filename => $file) {
                $this->addFile($file, $type, $locale, $filename, $keepOriginal);
            }
        }
    }
public function addFiles($files, $type = '', $locale = null, $keepOriginal = false): void
    {
        $files  = (array) $files;
        $locale = $this->normalizeLocaleString($locale);

        if (is_string(array_values($files)[0])) {
            foreach ($files as $filename => $file) {
                $this->addFile($file, $type, $locale, $filename, $keepOriginal);
            }
        } else {
            foreach ($files as $filename => $file) {
                $this->addFile($file, $type, $locale, $filename, $keepOriginal);
            }
        }
    }
public function addFiles ( $ files , $ type = '' , $ locale = null , $ keepOriginal = false ) : void { $ files = ( array ) $ files ; $ locale = $ this -> normalizeLocaleString ( $ locale ) ; if ( is_string ( array_values ( $ files ) [ 0 ] ) ) { foreach ( $ files as $ filename => $ file ) { $ this -> addFile ( $ file , $ type , $ locale , $ filename , $ keepOriginal ) ; } } else { foreach ( $ files as $ filename => $ file ) { $ this -> addFile ( $ file , $ type , $ locale , $ filename , $ keepOriginal ) ; } } }
Adds multiple files to this model, accepts a type and locale to be saved with the file.

@param $files
@param string $type
@param string|null $locale
@param bool $keepOriginal
@throws \Spatie\MediaLibrary\Exceptions\FileCannotBeAdded
@throws \Thinktomorrow\AssetLibrary\Exceptions\AssetUploadException
Adds multiple files to this model accepts a type and locale to be saved with the file .