Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

filens-preview

Latest version: v0.3.8

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: orca.zhang
3 Stars
1 Forks
15 Versions
2.7K Downloads
TypeScript Repo language

Scan summary

filens-preview was last scanned on 24 Nov 2026 at version 0.3.8. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 15 versions; the latest was published on 24 Nov 2026.
  • Findings: 1 rule fired in version 0.3.8 (10 instances: 10 low). The score describes this version only.
  • Downloads: 2,724 downloads.

Versions

15 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.3.8 LATEST 24 Nov 2026 1 rule fired
0.3.7 13 Nov 2026 1 rule fired
0.3.6 6 Nov 2026 1 rule fired
0.3.5 5 Nov 2026 Not shown
0.3.4 5 Nov 2026 Not shown

Rules fired in 0.3.8: 1

Findings

10 Low

Findings for v0.3.8. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

WebAssembly module included

The package includes a WebAssembly (.wasm) module. It cannot be reviewed as source, but it runs sandboxed inside the JavaScript runtime and can access only what the host code gives it. WebAssembly is common in parsers, codecs and cryptography libraries. Shown for awareness.

LOW
Checking access…

🔒 Create a free account to see all 10 findings with descriptions and instance counts

The score describes 0.3.8; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Standalone browser previews / 独立前端预览

Build the same preview engines as one main JavaScript file or split modules, with an optional external archive engine in either build. Both include Vue, styles, PDF/iWork workers and the document, image/RAW and STEP WASM engines. No conversion server or host Vue installation is needed.

For iOS and Android application embedding, the source SDKs wrap this same runtime in native views, with local file loading and lifecycle callbacks.

Version 0.3.7 displays only FiLens in the preview watermark, including fullscreen and hidden-toolbar views.

Version 0.3.0 adds the mobile source SDK integration, encrypted / solid / multipart RAR and 7z previews, Office attachment previews, smaller embedded WASM, shared ZIP loading and the default FiLens watermark. The optional archive engine and its worker stay external in both runtime builds.

Version 0.2.0 adds 28 toolbar languages, application-icon previews and the runtime fixes used by CLI 0.5.0's offline HTML preview. It uses native HEIC/HEIF decoding first, with a small dedicated WASM decoder as fallback. MOV plays through browser codecs. Applications can supply an optional mediaConverter for unsupported MOV codecs. Both builds preserve the same image and video support boundaries. For optional local MP4/MOV recovery, pass browserMedia: true to createPreview. It tries native playback first, then bounded remuxing or necessary WebCodecs AVC processing, and never calls mediaConverter for video in this mode. Browser-only media scope and validation.

npm install filens-preview
# Smaller package with only the lazy-loaded split runtime:
npm install filens-preview-split
import { createPreview } from 'filens-preview';
// Or: import { createPreview } from 'filens-preview/all-in-one';

The npm package includes both runtime directories, TypeScript declarations and third-party notices. Deploy node_modules/filens-preview/dist/split/ or dist/all-in-one/ for direct browser use. The split-only package contains the same split runtime and declarations without the all-in-one build; it is the smaller option when your app only uses lazy-loaded modules. Both packages include archive sidecars and third-party notices.

The split build registers lightweight format routes first, then imports the matching renderer when a file opens: PDF, DOCX, XLSX/CSV, PPTX, iWork, CAD, 3D, archives, ebooks, mindmaps, diagrams, codecs and panorama/RAW. Text, HTML and ordinary images share a native driver module. Vue and compression are shared; format engines and WASM remain cached after first use. Nested archive entries follow the same loading path. Deploy the entire directory so every format stays available, including offline. The all-in-one build still contains every engine in one main file. Measured loading sizes.

Build and use

npm ci
npm run build:wasm
npm run build:preview

Deploy the entire packages/preview/dist/split/ directory, or dist/all-in-one/filens.js with the archive sidecars when needed. The following current-source size table is generated by npm run report:preview-sizes from exact byte measurements.

Runtime Raw MB gzip MB Brotli MB
Split main runtime 15.92 5.35 4.17
All-in-one main JS (precompressed) 6.89 3.69 3.56
Optional archive WASM + worker (either build) 1.17 0.46 0.36
Split with archive assets 17.09 5.81 4.53
All-in-one with archive assets 8.06 4.15 3.92

The all-in-one build includes ready-to-serve filens.js.gz (Zopfli) and filens.js.br files, each capped at 4,000,000 bytes by the build. Configure your server to serve them for filens.js with the matching Content-Encoding and JavaScript content type; for example, use gzip_static on in nginx. Ordinary dynamic gzip of the JS is about 4.02 MB; use the supplied gzip file to meet the 4 MB transfer budget. The default GitHub all-in-one ZIP omits both sidecars to reduce its download size; the same release provides an optional filens-preview-<version>-all-in-one-precompressed.zip to overlay beside filens.js for static hosting. The already published 0.3.7 npm tarball keeps its existing contents, while new npm tarballs omit the sidecars. CDNs such as jsDelivr negotiate compression automatically. For self-hosted npm installs, enable dynamic compression or download the optional sidecar ZIP. Optional archive assets and notices are separate.

The merged runtime packs static WASM separately from long strings. Resources of 100 KB or more, including the PDF, iWork and media workers, each have their own LZMA group. A small inline WASM decoder restores ordinary resources at startup; worker sources and Blobs are created on demand, and WASM on its first use. It preserves the synchronous ESM exports and ES2020 bundling, with no JavaScript evaluator or additional module request. The build checks every restored asset byte and emits asset-packing.json with hashes, sizes and the compressed artifact checks. Restoration adds work during module initialization; use the split build when startup latency and selective engine loading matter most. The source reader uses a direct byte loop when native Base64 decoding is absent and verifies CRC-32 eight bytes at a time. Original asset bytes and integrity checks are preserved. Startup measurements. Grouping defers approximately 9.3 MB of WASM restoration for text and ordinary PDF previews. It still downloads the full single file; the split build also defers downloading unused engines. Grouped startup measurements. Independent workers further reduce text startup work; PDF reuses its deferred worker URL across sessions. Worker startup measurements. Each embedded WASM file now restores independently on first use, so HEIF and STEP do not unpack unrelated engines. WASM startup measurements. Resource groups share one lazily compiled decoder module. Decoder startup measurements. For offline HTML, opaque-origin HEIF workers receive the embedded WASM bytes from the document; ordinary HTTP workers retain their URL loading path.

These are current source build measurements (MB = 1,000,000 bytes), including application icons, optional Office decryption and 28 locale dictionaries. The archive engine always stays external, including all-in-one builds, and is loaded only for RAR, 7z or multi-volume ZIP. Ordinary ZIP and ZIP-based document formats share the existing JSZip/fflate dependencies. The extraction-only engine uses -O3 and LTO, retains encryption and all supported decoders, and shares its compiled WASM module between fresh per-operation workers. iWork uses the ordinary ZIP reader without duplicating the ZIP encryption library. The totals in the table include the optional archive assets and exclude notices. filens-preview contains both directories; filens-preview-split contains only the split directory. Both include notices and declarations. Packed and installed bytes are recorded in the release size report. Package measurements.

Both directories contain an index.html with a local file picker. Serve either directory over HTTP(S). To integrate into another page:

<div id="preview" style="height: 80vh"></div>
<script type="module">
  import { createPreview } from './split/filens.js';
  // Or: import { createPreview } from './all-in-one/filens.js';

  const viewer = createPreview('#preview', {
    src: './report.pdf',
    name: 'report.pdf',
    onError: error => console.error(error)
  });
  // File / Blob / Uint8Array sources also work; supply a name or extension.
  // viewer.update({ src: anotherFile, name: anotherFile.name });
  // viewer.destroy();
</script>

createPreview() mounts the shared Preview component and returns update(), getState(), setScale(), fullscreen() and destroy(). Pass toolbar: false to use your application’s toolbar, then call these controls on the returned viewer. Options include src, name, extension, toolbar, converter, panoramaProcessor, resourceResolver, fontResolver, onRendered and onError. The default converter uses the bundled frontend WASM engines. Use @filens/vue for direct Vue component integration.

The current source API also accepts controlsTarget to place the existing controls in an application header, including worksheet tabs, archive tools, media controls, document attachments and the 3D inspector. Keep the target mounted for the viewer's lifetime and load the runtime styles:

const viewer = createPreview('#preview', {
  src: file, name: file.name,
  controlsTarget: document.querySelector('#preview-actions')
});

Style this host for your header's width and scrolling; driver controls retain their actual DOM nodes and handlers. Fullscreen brings controls inside the fullscreen preview and restores the header on exit. Destroying the viewer removes its controls. This option is included in preview 0.3.7. Package and runtime measurements are recorded separately in the linked build receipts.

Previews display a translucent FiLens watermark at the bottom right, including when the toolbar is hidden and in preview fullscreen mode.

Split chunks can range from a few KB to hundreds of KB after compression. Those figures exclude shared dependencies and engines; a chunk is not a complete per-format download. The all-in-one file embeds CSS and document/image engines. The RAR/7z engine and its worker are always separate files, never base64-embedded; deploy both sidecars alongside the main JS to enable RAR, 7z and multi-volume ZIP. They can be omitted when those formats are not required. A separate notices file accompanies both builds and should be distributed with them. Exact measurements.

Single-file embedding still requires browser support for WebAssembly and workers. Pages with a Content Security Policy must permit the generated inline styles, blob: workers, and blob: / data: WASM connections. WASM compilation needs 'wasm-unsafe-eval'; packing adds no JavaScript 'unsafe-eval' requirement. Use an HTTP(S) server for module imports, rather than opening the module-importing index.html as a file: URL. The CLI's self-contained HTML embeds the module instead and supports file: URLs. RAR, 7z and multi-volume ZIP require the separate archive assets over HTTP(S); CLI HTML shows a --mode serve fallback for them instead of embedding the engine. The supported formats and fidelity limits are shared with the demo.

Languages and application icons (0.2.0)

Preview toolbars, common prompts and model controls include the same 28 locale codes as ZimaOS. Pass locale: 'zh_CN' (or zh-CN); omit it for browser language detection. Switch language with viewer.update({ locale: 'de_DE' }). Optional messages: { Next: 'Forward' } overrides English source phrases per instance. Both split and all-in-one builds contain these dictionaries for offline use. See the locale list and API notes.

APK/IPA packages open as ZIP-compatible archives with directory browsing and entry previews. Windows EXE/DLL/MUI/MUN resource files can be previewed as application icons using the included WASM converter. The converter also exposes APK/IPA icon extraction for explicit requests. Icon extraction supports compiled Android icon resources, XML/binary iOS plist metadata, iOS CgBI PNGs, and Windows PNG/DIB icon frames. These additions are included in 0.2.0. See the supported icon representations and limits.

The browser file picker accepts multi-volume RAR (.part01.rar or .rar/.r00), 7z (.7z.001) and ZIP (.zip.001 or .z01/.zip) archives. Select every part together; picker order does not matter. Password prompts and nested previews work across the parts. Missing first/intermediate volumes identify the filename; the engine validates completeness. Limits are 256 parts and 512 MiB compressed input per set, with 128 MiB per expanded entry. Both HTTP(S)-served builds support this workflow with local archive sidecars; no remote service or CDN is used. Programmatic callers supply the other parts as src.archiveVolumes: [{ name, source }]; see the core API example.

The split build loads converter-office.wasm only when an encrypted Office document has a supplied password; a password prompt alone does not download it. The all-in-one file includes the combined core with Office decryption, PostScript and graphics conversion, avoiding duplicate WASI and parsing code. Its static assets use independent LZMA groups; WASM is restored and then compiled when first needed. HTTP split assets remain ordinary WASM and use streaming compilation with the correct MIME. Historical core-only comparisons are in the same-source measurements; current main-runtime bytes are in asset-packing.json and the format package audit.

CLI preview

CLI 0.4.0 includes preview. The first preview downloads the optional frontend package into the writable versioned cache; subsequent previews work offline. You can install it ahead of time:

npm install -g filens-cli
filens setup-preview
filens preview report.pdf
filens preview report.pdf --no-open --json

filens-cli-lite supports the same preview command without OCR models. Frontend resources are separate from the base CLI installation. For a source build:

npm run build:wasm
npm run build:agent:preview
npm run filens -- preview report.pdf

# Or run the freshly built binary directly
./dist/filens preview drawing.step
./dist/filens preview report.pdf --no-open --json

CLI 0.4.x used a loopback HTTP server. CLI 0.5.0 defaults to a self-contained HTML instead: the shared all-in-one frontend runtime and a copy of the selected file are embedded, the browser opens a file: URL, and the CLI exits. No HTTP server is started. Parsing, conversion and rendering happen in the browser, with no external runtime dependencies. The page checks WASM and local Worker support and displays compatibility instructions on failure. It also includes a GitHub link and third-party notices. Browser launch success does not certify rendering; the CLI cannot automatically detect every browser failure.

# Generate and open an offline HTML, or save it without opening a browser
filens preview report.pdf
filens preview report.pdf --output report-preview.html --no-open
filens preview report.pdf --no-open --json

# Compatibility mode: serve only on this machine; Ctrl-C stops it
filens preview report.pdf --mode serve

HTML mode returns a file: URL and a filesystem path; the command exits even with --no-open --json. Default HTML files remain in the system temporary directory so the browser can finish loading after CLI exit. The HTML contains the original file bytes; delete it when no longer needed. --output never overwrites existing files. Base64 embedding adds about one third to the source file size, plus the runtime and notices. Prefer HTTP mode or the browser file picker for very large files. The HTML's Content Security Policy blocks external connections and resource loads; linked images/fonts are unavailable unless embedded or supplied locally. The GitHub link opens only when clicked.

On file: pages PDF.js uses its supported main-thread worker implementation to avoid opaque-origin module-worker restrictions in WebKit. Large PDFs can occupy the UI thread; HTTP mode keeps the usual worker loading path. WebKit currently cannot load the embedded iWork parser worker from a file: page. Its error panel offers --mode serve; the same Keynote sample was verified with the split runtime in that compatibility mode. Chromium and Firefox support the tested iWork HTML previews directly.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm filens-preview

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

PHP2Shell, Day 5 93.6% of Measurable Instances Still Unpatched (1)
Vulnerability Insights

PHP2Shell, Day 5: The Panic Hasn’t Turned Into Patching

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229