request; $uploadedFile = $request->getUploadedFile('zipfile'); if (!$uploadedFile) { return new JsonResponse(['error' => 'No file uploaded'], 400); } if ($uploadedFile->getClientMimeType() !== 'application/zip') { return new JsonResponse(['error' => 'Invalid file type, only ZIP allowed'], 400); } // Traitement du fichier si nécessaire return new JsonResponse(['message' => 'File uploaded successfully'], 200); } }