protected function handleMultipleFileUploads(Request $request, Model $model, $paramName, $uploadedFiles, $relativePath)
    {
        $this->_checkFileRelationExists($model, $paramName);

        $data = $request->attributes->all();
        $fileBag = $request->files;
        foreach ($uploadedFiles as $index => $uploadedFile) {
            if (!$uploadedFile->isValid()) {
                throw new UploadException($uploadedFile->getError());
            }

            $filename = $this->getFilename($uploadedFile);
            $storagePath = $this->getStoragePath($relativePath);
            $this->moveUploadedFile($uploadedFile, $filename, $storagePath);

            $location = $relativePath.$filename;

            if (count($fileBag->get($paramName)) > 1) {
                $data[$paramName][$index] = [$this->getLocationColumn() => $location];
            } else {
                $data[$paramName][$this->getLocationColumn()] = $location;
            }

            $request->merge($data);
        }
    }