
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
file-viewer-image
Advanced tools
A library for Angular v15+ that provides developers with a convenient way to create an image viewer component. It offers various functions for UI operations such as zoom in, zoom out, download, and printing. The library's selector is lib-file-viewer and i
A library for Angular v15+ that provides developers with a convenient way to create an image viewer component. It offers various functions for UI operations such as zoom in, zoom out, download, and printing. The library's selector is lib-file-viewer and it accepts an input imageUrl to display the desired image.
access source code on https://github.com/mrgreentm/file-image-viewer
To install the File Viewer Image library, run the following command:
npm i file-viewer-image
1 - Import the FileViewerModule into your Angular module:
import { NgModule } from '@angular/core';
import { FileViewerModule } from 'file-viewer-image';
@NgModule({
imports: [
// ...
FileViewerModule
],
// ...
})
export class AppModule { }
2 - Use the lib-file-viewer component in your Angular template:
<lib-file-viewer [imageUrl]="imagePath"></lib-file-viewer>
Replace imagePath with the URL of the image you want to display.
The lib-file-viewer component accepts the following input:
imageUrl: The URL of the image to display in the viewer. Features
To zoom in on the image, use the zoom in function provided by the library. This allows users to magnify the image for a closer look.
To zoom out on the image, use the zoom out function provided by the library. This allows users to reduce the image size for a wider view.
The library offers a download function that allows users to download the displayed image. This is useful for saving the image locally or sharing it with others.
Users can print the displayed image using the print function provided by the library. This enables easy printing of the image directly from the viewer.
Here's an example of how to use the File Viewer Image library in your Angular application:
import { Component } from '@angular/core';
@Component({
selector: 'app-image-viewer',
template: `
<lib-file-viewer [imageUrl]="imagePath"></lib-file-viewer>
`,
})
export class ImageViewerComponent {
imagePath = 'https://example.com/image.jpg';
}
Make sure to replace 'https://example.com/image.jpg' with the actual URL of the image you want to display.
License This library is released under the MIT License. See LICENSE for more information.
Feel free to contribute to this library by reporting issues, suggesting improvements, or submitting pull requests. https://github.com/mrgreentm/file-image-viewer
FAQs
A library for Angular v15+ that provides developers with a convenient way to create an image viewer component. It offers various functions for UI operations such as zoom in, zoom out, download, and printing. The library's selector is lib-file-viewer and i
We found that file-viewer-image demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.