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

nz-file-uploader

v2.0.1

Published

This is an Angular plugin that supports uploading files to server as a `multipart/form-data`

Downloads

31

Readme

Angular FileUploader

This is an Angular plugin that supports uploading files to server as a multipart/form-data

Features

  • Upload files to your server by just providing the api url in the config
  • Configuration for file types and file sizes are allowed
  • custom messages on success and failure of file uploads
  • Supports multiple file uploads in one go
  • Supports Drag&Drop uploads
  • Provides the percentage of file uploaded to server
  • Shows progress of file uploads
  • Works with any server side platform that supports standard HTML multipart form uploads

Install

npm install nz-file-uploader --save

Setup

Step1 : Import FileUploadModule from the package nz-file-uploader in app.module.ts file.

import { FileUploadModule } from  'nz-file-uploader'

Step2 : Add the FileUploadModule in the NgModule Imports array.

FileUploadModule.forRoot()

Step3 : Add the tags <nz-file-uploader></nz-file-uploader> in the app.component.ts file.

Setting Global Options

Pass values to FileUploadModule.forRoot()

// root app NgModule
 imports: [
 FileUploadModule.forRoot({
     API:  'Your api url here', // The files are uploaded using your api url
     fileTypes: ['images/jpeg', 'images/png'],
     maxFileSize: '100', // in MB
     fileTypeMsg:  'Please select valid filetype',
     filesizeMsg:  'File is too large',
     uploadSuccessMsg: 'Successfully uploaded',
     uploadFailureMsg: 'Upload failed',
     removePlaceHolder: 'remove',
     uploadBtnLabel: 'Upload',
    }),
 ],

Options :

Following are the options and its defaults values

| Options | Type | Default | Required | |:-----------------:|:------:|:------------------------------------------------------:|:--------:| | API | String | empty | True | | fileTypes | Array | 'image/jpeg' 'image/png' 'video/mp4' 'application/zip' | False | | maxFileSize | String | 500 MB | False | | fileTypeMsg | String | Please select valid filetype | False | | filesizeMsg | String | File is too large | False | | uploadSuccessMsg | String | Successfully uploaded | False | | uploadFailureMsg | String | Upload failed | False | | removePlaceHolder | String | remove | False | | uploadBtnLabel | String | Upload | False |

Description :

This package handels the angular UI to upload files to server using your own backend api. Just provide your api URL in the configuration in imports.

Don't forget to handel the uploads in "multipart/form-data" in your backend service.

Credits

Author && Developer : Nizamuddin shaik

Designer : Jaseem.p

License

Mit License: http://www.opensource.org/licenses/mit-license.php