"use strict";(()=>{var e={};e.id=2310,e.ids=[2310],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},56750:(e,t,r)=>{r.r(t),r.d(t,{config:()=>l,default:()=>P,routeModule:()=>A});var n={};r.r(n),r.d(n,{config:()=>c,default:()=>f});var i=r(89947),o=r(2706),a=r(96762),s=r(29021),u=r.n(s),d=r(33873),p=r.n(d);let c={api:{responseLimit:"1mb",bodyParser:{sizeLimit:"200mb"}}};async function f(e,t){if("GET"!==e.method)return t.json({msg:"Failed!"});let r=String(e.query.url).replace(process.env.DSQL_STATIC_HOST||"",""),n=p().join(process.env.DSQL_STATIC_SERVER_DIR||"","/",r);if(!u().existsSync(n))return t.json({success:!1});console.log("mediaStoragePath",n),u().createReadStream(n).pipe(t)}let P=(0,a.M)(n,"default"),l=(0,a.M)(n,"config"),A=new i.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/fetch-media",pathname:"/api/fetch-media",bundlePath:"",filename:""},userland:n})},2706:(e,t)=>{var r;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},89947:(e,t,r)=>{e.exports=r(75600)}};var t=require("../../webpack-api-runtime.js");t.C(e);var r=t(t.s=56750);module.exports=r})();