var Service = require('Service');
var util = require('util');

/**
 * 获得附件信息
 */
var GetAttachInfo = function() { 
  Service.call(this);
};

util.inherits(GetAttachInfo, Service);

module.exports = GetAttachInfo;

/**
 * 处理服务请求
 * @param  {Object} req 服务请求对象
 * @param  {Object} res 服务响应对象
 */
GetAttachInfo.prototype.process =  function(req, res) { 
  res.data = {
    savePath : server.config.Attach.savePath,
    uploadMaxSize : server.config.Attach.uploadMaxSize,
    cacheSaveDays : server.config.Attach.cacheSaveDays
  };
  if(!res.data.savePath || res.data.savePath=='') res.data.savePath = '/files';
  this.end(res);
};
