'use strict';

const Service = require('egg').Service;
const FdfsClient = require('fdfs');
const { fdfs: config } = require('../../config/config.default.js')({});
const fdfs = new FdfsClient(config);

class FDFSService extends Service {

  async upload(...args) {
    return fdfs.upload.apply(fdfs, args);
  }

  async download(...args) {
    return fdfs.download.apply(fdfs, args);
  }
}

module.exports = FDFSService;
