Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@mindbowser_inc/ng-ineers-file-viewer
Advanced tools
A versatile Angular library for viewing documents, images, and audio/video files directly within your Angular application. This library supports a variety of file types and offers customizable configurations.
A versatile Angular library for viewing documents, images, and audio/video files directly within your Angular application. This library supports a variety of file types and offers customizable configurations.
Install the library via npm:
npm install @mindbowser_inc/ng-ineers-file-viewer --save
Getting Started
import { DocViewerModule, ImageViewerModule, AudioVideoViewer } from '@mindbowser_inc/ng-ineers-file-viewer';
@NgModule({
imports: [
DocViewerModule,
ImageViewerModule,
AudioVideoViewer
],
})
export class AppModule {}
<doc-viewer
[url]="docUrl"
viewer="google"
style="width:100%;height:50vh;">
</doc-viewer>
Inputs:
url: The document URL. viewer: Choose from 'google' (default), 'office', 'mammoth', 'pdf', or 'url'. Image Viewer To display images:
<image-viewer [src]="imageUrls" [(index)]="currentIndex"></image-viewer>
Optional Configuration:
const config = {
btnClass: 'default',
zoomFactor: 0.1,
allowFullscreen: true,
allowKeyboardNavigation: true,
btnIcons: {
zoomIn: 'fa fa-plus',
zoomOut: 'fa fa-minus',
next: 'fa fa-arrow-right',
prev: 'fa fa-arrow-left',
fullscreen: 'fa fa-arrows-alt',
}
};
Audio/Video Viewer To display audio:
<audio-video-viewer [url]="audioUrl" viewer="audio"></audio-video-viewer>
To display video:
<audio-video-viewer [url]="videoUrl" viewer="video"></audio-video-viewer>
Supports .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pdf.
Supports .doc, .docx, .xls, .xlsx, .ppt, .pptx.
Supports all standard image formats including .jpg, .jpeg, .png, .gif. Audio/Video Viewer
Supports standard audio formats like .mp3, .wav and video formats like .mp4, .avi.
For viewing .docx files from blobs using Mammoth, you can directly use the convertToHtml function integrated into the package.
For .docx files, install Mammoth:
npm install mammoth --save
Include mammoth.browser.min.js in angular.json:
"scripts": [
"node_modules/mammoth/mammoth.browser.min.js"
]
<doc-viewer
viewer="mammoth"
[url]="blobUrl"
style="width:100%;height:50vh;">
</doc-viewer>
Custom Viewer Example For external document viewers:
<doc-viewer
[viewerUrl]="'https://docs.google.com/gview?url=%URL%&embedded=true'"
[url]="'https://example.com/sample.doc'"
viewer="url"
style="width:100%;height:50vh;">
</doc-viewer>
Contributions are welcome! Please open an issue or submit a pull request with your improvements or suggestions.
FAQs
A versatile Angular library for viewing documents, images, and audio/video files directly within your Angular application. This library supports a variety of file types and offers customizable configurations.
We found that @mindbowser_inc/ng-ineers-file-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.