acl->checkScope(Import::ENTITY_TYPE)) { throw new Forbidden(); } $contents = $request->getBodyContents() ?? ''; $attachmentId = $this->service->uploadFile($contents); return ResponseComposer::json(['attachmentId' => $attachmentId]); } }