MCPcopy Create free account
hub / github.com/error311/FileRise / isVirusScanLikelyEnabled

Function isVirusScanLikelyEnabled

public/js/upload.js:37–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35// --- ClamAV scanning UI helpers ----------------------------------------
36
37function isVirusScanLikelyEnabled() {
38 try {
39 if (
40 window.__FR_FLAGS &&
41 Object.prototype.hasOwnProperty.call(window.__FR_FLAGS, 'clamavScanUploads')
42 ) {
43 return !!window.__FR_FLAGS.clamavScanUploads;
44 }
45
46 // Fallbacks if you ever expose config globals directly
47 const cfg =
48 (window.appConfig) ||
49 (window.FR_CONFIG) ||
50 (window.__FR_CONFIG__) ||
51 (window.siteConfig) ||
52 null;
53
54 return !!(cfg && cfg.clamav && cfg.clamav.scanUploads);
55 } catch (e) {
56 return false;
57 }
58}
59
60let _virusScanNoticeDismissed = false;
61

Callers 1

showVirusScanNoticeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected