// 腾讯云 COS 配置
module.exports = {
  // COS 配置
  secretId: process.env.COS_SECRET_ID || 'AKIDcH6qOipkT0Lo9HJ8kEhaJrBML8f4GF1l',
  secretKey: process.env.COS_SECRET_KEY || 'Yt1vc5LNCnBSdeS2RdbMvHOIyTkoeIjw',
  bucket: process.env.COS_BUCKET || 'pap-1314297964',
  region: process.env.COS_REGION || 'ap-shanghai',

  // URL 配置
  bucketUrl: 'https://pap-1314297964.cos.ap-shanghai.myqcloud.com',
  cdnUrl: 'https://cdn.csybhelp.com',

  // 文件配置
  allowedImageTypes: ['image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'image/webp', 'image/bmp', 'image/svg+xml'],
  allowedDocTypes: [
    'application/pdf',
    'application/msword',
    'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
    'application/vnd.ms-excel',
    'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
    'application/vnd.ms-powerpoint',
    'application/vnd.openxmlformats-officedocument.presentationml.presentation',
    'text/plain'
  ],
  allowedVideoTypes: ['video/mp4', 'video/mpeg', 'video/quicktime', 'video/x-msvideo', 'video/x-ms-wmv'],

  // 文件大小限制（字节）
  maxImageSize: 10 * 1024 * 1024,  // 10MB
  maxDocSize: 50 * 1024 * 1024,    // 50MB
  maxVideoSize: 200 * 1024 * 1024, // 200MB

  // 图片压缩配置
  imageCompress: {
    quality: 80,        // 压缩质量 0-100
    maxWidth: 1920,     // 最大宽度
    maxHeight: 1920,    // 最大高度
    minSize: 100 * 1024 // 最小压缩大小（字节），小于此值不压缩，默认 100KB
  }
};
