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

ngxuploader

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngxuploader

## Installation

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

ngxuploader

Installation

To install this library, run:

$ npm install ngxuploader --save

Consuming your library

You can import your library in any Angular application by running:

$ npm install ngxuploader

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import ngxuploader
import { NgxUploaderComponent } from 'ngxuploader';
import { UploaderService } from 'ngxuploader';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,

    // Specify your library as an import
    NgxUploaderComponent
  ],
providers: [UploaderService],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once your library is imported, you can use this component in your Angular application:

<!-- You can now use your library component in app.component.html -->
<h1>
  {{title}}
</h1>
<ngx-uploader-component></ngx-uploader-component>

Customize

The component have inputs for support diferent functionalities:

This are the default values =>

  @Input() textUpload: string = 'Upload';
  @Input() recommend: string = 'Recommend minimum size 100x100px';
  @Input() textDrop: string = 'Drop Here';
  @Input() token: string = '';
  @Input() urlBackend: string = 'http://localhost:8080/api/file/';
  @Input() appends: Array<iAppend>;

You can change in the component, for example:

<ngx-uploader-component
    [textUpload]=" 'Upload here' "
    [recommend]=" {{ recommendText }} "
><ngx-uploader-component>
  • If you need a token for upload the file you need put the token in the parameter token

extra parameters

  • appends is all parameters extras for your upload, any parameter extra you need put in the appends
export interface iAppend {
    name: string;
    value: string;
}

For example the folder in your server for upload the file

myAppend = [
    { 'uploadFolder': '/avatarFolder' }
] 
<ngx-uploader-component
    [appends]='myAppend'
><ngx-uploader-component>

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

issues

report in github

DEMO

stackblitz the demo its only angular right now, no have backend (wip)

License

MIT © Jorge Cano

Keywords

FAQs

Package last updated on 28 Dec 2017

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