text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.editFileName = exports.imageFileFilter = void 0;
  const imageFileFilter = (req, file, cb) => {
      if (!file.originalname.match(/\.(jpg|jpeg|png|gif)$/)) {
          return cb(new Error('Недопустимый формат изображения'), false);
      }
      cb(null, true);
  };
  exports.imageFileFilter = imageFileFilter;
  const editFileName = (req, file, cb) => {
      const randomName = Array(32).fill(null).map(() => (Math.round(Math.random() * 16)).toString(16)).join('');
      cb(null, `${randomName}-${file.originalname}`);
  };
  exports.editFileName = editFileName;
  //# sourceMappingURL=file-upload.utils.js.map