import {request, upload} from "../../common/request"
import { FILE_PATH as prefix } from "../AppPath";
export default {
	
  upload: function (filePath, config = {}) {
	return upload(prefix + '/file/upload?uploadPath=userdir',filePath)    
  },

  download: function (params) {
    return request({
      url: prefix + '/file/download',
      method: 'get',
      params: params
    })
  },

  downloadUrl: function (params) {
    return request({
      url: prefix + '/file/downloadUrl',
      method: 'get',
      params: params
    })
  },

  uploadFile: function (filePath, config = {}) {
	return upload(prefix + '/file/uploadFile?uploadPath=userdir',filePath)      
  },
  downloadFile: function (params) {
    return request({
      url: prefix + '/file/downloadFile',
      method: 'get',
      params: params
    })
  }
}
