export function getBase64(file) {
  return new Promise(function (resolve) {
    var reader = new FileReader();
    reader.readAsDataURL(file);
    reader.onload = function () {
      return resolve({
        status: 'success',
        url: reader.result
      });
    };
    reader.onerror = function (error) {
      return resolve({
        status: 'error',
        error: error
      });
    };
  });
}
export function getAccept(fileType) {
  switch (fileType) {
    case 'image':
      return '.jpg,.png';
    case 'svg':
      return '.svg';
    case 'office':
      return '.doc,.docx,.pdf,.xls,.xlsx';
    case 'zip':
      return '.rar,.zip';
    default:
      // return '.rar,.zip,.doc,.docx,.pdf,.jpg,.png';
      return '*';
  }
}