npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aurora-image-upload

v16.1.0

Published

This library provides a user-friendly component for uploading and validating images in Angular applications. It supports both file chooser and drag-and-drop methods for image uploading.

Downloads

6

Readme

Aurora Image Upload Library

This library provides a user-friendly component for uploading and validating images in Angular applications. It supports both file chooser and drag-and-drop methods for image uploading.

Key Features

  • Image Dimension Limitations: Set maximum width and height for the uploaded image in pixels using the max_width and max_height inputs. This helps to ensure that the uploaded image fits within your application's design constraints.

  • Image Size Limitation: Limit the size of the uploaded image using the max_size input. This input accepts the size in bytes, providing flexibility to set the limit based on your application's needs.

  • Image Type Validation: Restrict the types of images that can be uploaded using the validImageTypes input. This input accepts an array of image MIME types, allowing you to specify which image formats are valid for your application.

  • Initial Image Setting: Pre-load an image in the upload component using the initImageUrl input. This is useful when you want to display a default image before the user uploads a new one.

  • Image Upload Event: The uploadedImageFile output emits the file of the uploaded image, allowing you to handle the image file in your application's logic. If the image is removed, it emits null.

Installation

Install the library using npm:

npm install aurora-image-upload

Usage

Import the AuroraImageUploadModule in your Angular module:

import { AuroraImageUploadModule } from 'aurora-image-upload';

@NgModule({ 
  imports: [ 
    // other imports 
    AuroraImageUploadModule 
  ], 
    // other properties 
}) 
export class AppModule { }

Use the aurora-image-upload component in your Angular templates:

<aurora-image-upload 
  [max_height]="1000" 
  [max_width]="1000" 
  [max_size]="1000" 
  [validImageTypes]="['image/jpeg', 'image/png']" 
  [initImageUrl]="'https://example.com/image.jpg'" 
  (uploadedImageFile)="handleImageUpload($event)"> 
</aurora-image-upload>