Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@filerobot/utils / lib / isCloudimageFastPreviewSupported.js
Size: Mime:
import { BYTES_TO_MEGA_BYTES, LARGE_FILE_SIZE_IN_MB } from './constants';
import isAi from './isAi';
import isJpg from './isJpg';
import isPhotoshopFile from './isPhotoshopFile';
import isTiff from './isTiff';
export default function isCloudimageFastPreviewSupported(file) {
  if (!file) return false;
  var _ref = (file === null || file === void 0 ? void 0 : file.size) || {},
    _ref$bytes = _ref.bytes,
    bytes = _ref$bytes === void 0 ? 1 : _ref$bytes;
  var isLargeJpgFile = bytes / BYTES_TO_MEGA_BYTES > LARGE_FILE_SIZE_IN_MB && isJpg(file);
  if (isPhotoshopFile(file) || isTiff(file) || isAi(file) || isLargeJpgFile) {
    return true;
  }
  return false;
}