(()=>{var e={};e.id=722,e.ids=[722],e.modules={2021:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>g,routeModule:()=>d,serverHooks:()=>x,workAsyncStorage:()=>c,workUnitAsyncStorage:()=>f});var s={};t.r(s),t.d(s,{DELETE:()=>l});var i=t(96559),n=t(48088),o=t(37719),a=t(29021),u=t(33873),p=t.n(u);async function l(e){try{let{filePath:r}=await e.json();if(!r||"string"!=typeof r)return new Response(JSON.stringify({error:"Invalid or missing file path"}),{status:400});if(r.includes(".."))return new Response(JSON.stringify({error:"Invalid path"}),{status:400});let t=r.replace(/^api\/files\//,""),s=p().join(process.cwd(),"uploads",t);return await a.promises.unlink(s),new Response(JSON.stringify({message:"File deleted successfully"}),{status:200})}catch(e){return console.error("File deletion failed:",e),new Response(JSON.stringify({error:e.message}),{status:500})}}let d=new i.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/delete-file/route",pathname:"/api/delete-file",filename:"route",bundlePath:"app/api/delete-file/route"},resolvedPagePath:"/Users/jaseerali/Desktop/UPTURNIST/kyc/src/app/api/delete-file/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:c,workUnitAsyncStorage:f,serverHooks:x}=d;function g(){return(0,o.patchFetch)({workAsyncStorage:c,workUnitAsyncStorage:f})}},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29021:e=>{"use strict";e.exports=require("fs")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:e=>{"use strict";e.exports=require("path")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},96487:()=>{},96559:(e,r,t)=>{"use strict";e.exports=t(44870)}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[719],()=>t(2021));module.exports=s})();