New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

empower-file-viewer

Package Overview
Dependencies
Maintainers
5
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

empower-file-viewer

--- ### Installation --- ``` npm i empower-file-viewer ``` ### Usage ``` Include in the component:

  • 0.1.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

Empower File Viewer


Installation


npm i empower-file-viewer

Usage

Include in the component:

import FileViewer from 'empower-file-viewer';

Properties

file - Object that consist of path and type.
path - The path of the file you wanted to view, MUST be on the public folder.
type - Type of the file (e.g. pdf,png,jpeg).
watermark - This string would be used to watermark your file just for security reason if they downloaded it as image, this is an optional property.

Limitations

The file viewer only caters the following file types (.docx,.pdf,.png,.jpeg,.jpg)

Example

const sampleProps = {
  file: {
    path : 'sample.pdf', //public path
    type : 'pdf',
  },
  watermark : 'EMPOWER'
};
const App = () => {

  return (
    <div className="sample-div">
      <FileViewer
        {...sampleProps}
      />
    </div>
  );
}

export default App;

FAQs

Package last updated on 14 Jul 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc