From 9a0dab1bf24ea74e36d168eb42e1d4716d078b0e Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Wed, 21 May 2025 10:06:53 +0000
Subject: (김준회) Import 시 DRM 해제 기능 추가 적용(벤더 데이터: form-data,
 tags)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/form-data/import-excel-form.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'components/form-data/import-excel-form.tsx')

diff --git a/components/form-data/import-excel-form.tsx b/components/form-data/import-excel-form.tsx
index 45e48312..fd9adc1c 100644
--- a/components/form-data/import-excel-form.tsx
+++ b/components/form-data/import-excel-form.tsx
@@ -4,6 +4,7 @@ import { saveAs } from "file-saver";
 import { toast } from "sonner";
 import { DataTableColumnJSON } from "./form-data-table-columns";
 import { updateFormDataInDB } from "@/lib/forms/services";
+import { decryptWithServerAction } from "../drm/drmUtils";
 // Assuming the previous types are defined above
 export interface ImportExcelOptions {
   file: File;
@@ -52,7 +53,8 @@ export async function importExcelData({
     const existingTagNumbers = new Set(tableData.map((d) => d.TAG_NO));
 
     const workbook = new ExcelJS.Workbook();
-    const arrayBuffer = await file.arrayBuffer();
+    // const arrayBuffer = await file.arrayBuffer();
+    const arrayBuffer = await decryptWithServerAction(file);
     await workbook.xlsx.load(arrayBuffer);
 
     const worksheet = workbook.worksheets[0];
-- 
cgit v1.2.3

