
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
react-file-viewer-v2
Advanced tools
Extendable file viewer for web
react-file-viewer-v2 is a small package for viewing files on the web inspired by react-file-viewer
npm install --save react-file-viewer-v2
There is one main React component, FileViewer
, that takes the following props:
fileType
string: type of resource to be shown (one of the supported file
formats, eg 'png'
). Passing in an unsupported file type will result in displaying
an unsupported file type
message (or a custom component).
filePath
string: the url of the resource to be shown by the FileViewer.
unsupportedComponent
react element [optional]: A component to render in case
the file format is not supported.
import React, { Component } from 'react'
import { FileViewer } from 'react-file-viewer-v2'
class Example extends Component {
render() {
return <FileViewer
fileType="pdf"
filePath={pdf}
/>
}
}
MIT © javier-mora
FAQs
Extendable file viewer for web
The npm package react-file-viewer-v2 receives a total of 109 weekly downloads. As such, react-file-viewer-v2 popularity was classified as not popular.
We found that react-file-viewer-v2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.