Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.8/.cache/esm/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.8/.cache/esm/f0f46b2ded259791.js

let AppError,catchAsync,successResponse,failedResponse;_ed2‍.x([["default",()=>_ed2‍.o]]);_ed2‍.w("../../utils/apiError",[["default",["AppError"],function(v){AppError=v}]]);_ed2‍.w("../../utils/catchAsync",[["default",["catchAsync"],function(v){catchAsync=v}]]);_ed2‍.w("../../utils/responseFormat",[["successResponse",["successResponse"],function(v){successResponse=v}],["failedResponse",["failedResponse"],function(v){failedResponse=v}]]);



const add = catchAsync(async (req, res, next) => {
  if (!req.file.filename) {
    return next(new AppError("File must be provided.", 500));
  }
  return successResponse(
    res,
    {
      destination: req.file.destination,
      filename: req.file.filename,
      path: req.file.path,
    },
    "File saved successfully",
    201
  );
});

_ed2‍.d({ add });

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists