$message =
new ImportExportMessage($context,
$logEntity->
getId(),
$logEntity->
getActivity());
$this->messageBus->
dispatch($message);
return new Response('', Response::HTTP_NO_CONTENT
);
} #[Route(path: '/api/_action/import-export/file/prepare-download/{fileId}', name: 'api.action.import_export.file.prepare-download', methods: ['POST'])]
public function prepareDownload(string
$fileId, Context
$context): Response
{ $token =
$this->downloadService->
regenerateToken($context,
$fileId);
return new JsonResponse(['accessToken' =>
$token]);
} #[Route(path: '/api/_action/import-export/file/download', name: 'api.action.import_export.file.download', defaults: ['auth_required' => false], methods: ['GET'])]
public function download(Request
$request, Context
$context): Response
{ /** @var array<string> $params */
$params =
$request->query->
all();
$definition =
new DataValidationDefinition();
$definition->
add('fileId',
new NotBlank(),
new Type('string'
));