{"_id":"@99xt/ng2-fileupload","_rev":"18-3c0cc405037c10ad3ba9fbcb84f57d87","name":"@99xt/ng2-fileupload","description":"Simpler file upload implementation for angular2 apps","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@99xt/ng2-fileupload","version":"0.0.1","keywords":["Angular2","ng2","FileUpload","99xt"],"author":{"name":"thinkholic","email":"mailtokasun@gmail.com"},"license":"MIT","_id":"@99xt/ng2-fileupload@0.0.1","maintainers":[{"name":"thinkholic","email":"mailtokasun@gmail.com"}],"homepage":"https://github.com/99xt/ng2-fileupload#readme","bugs":{"url":"https://github.com/99xt/ng2-fileupload/issues"},"dist":{"shasum":"cbfc440fad7fc0c221d9147256019f18940b1e8c","tarball":"https://registry.npmjs.org/@99xt/ng2-fileupload/-/ng2-fileupload-0.0.1.tgz","integrity":"sha512-WGM77lrkDXYbt5ZxcJfgSNgRg8S1A+6atScLpkaBsU7GKXSbO7Owp0DDTZoX1xVUV489kcAITsTcQfjwvyDlDQ==","signatures":[{"sig":"MEUCIDt31oQePBkdhlSI/gB2dzT/fSRUq5vgf7WAzLQgWfVlAiEA3iTECYcs9L4Bk2aq7uxTlErbBb+aHxa2SrsG/SnD6hg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"cbfc440fad7fc0c221d9147256019f18940b1e8c","gitHead":"48a085ed7b4b03d1973477e5584f187923a05333","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"thinkholic","email":"mailtokasun@gmail.com"},"repository":{"url":"git+https://github.com/99xt/ng2-fileupload.git","type":"git"},"_npmVersion":"3.10.10","description":"Ng2 FileUpload Component","directories":{},"_nodeVersion":"6.11.0","dependencies":{"rxjs":"^5.4.1","zone.js":"^0.8.12","typescript":"^2.3.4","@angular/core":"^4.2.4","@angular/http":"^4.2.4","@angular/forms":"^4.2.4","@angular/common":"^4.2.4","@angular/router":"^4.2.4","@angular/compiler":"^4.2.4","@angular/animations":"^4.2.4","@angular/compiler-cli":"^4.2.4","@angular/platform-server":"^4.2.4","@angular/platform-browser":"^4.2.4","@angular/platform-browser-dynamic":"^4.2.4"},"devDependencies":{"typescript":"^1.7.5"},"_npmOperationalInternal":{"tmp":"tmp/ng2-fileupload-0.0.1.tgz_1498838260955_0.29128223680891097","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@99xt/ng2-fileupload","version":"0.0.2","keywords":[],"author":{"name":"thinkholic","email":"mailtokasun@gmail.com"},"license":"MIT","_id":"@99xt/ng2-fileupload@0.0.2","maintainers":[{"name":"thinkholic","email":"mailtokasun@gmail.com"},{"name":"mjfernando","email":"ashanf@99x.lk"}],"homepage":"https://github.com/99xt/ng2-fileupload#readme","bugs":{"url":"https://github.com/99xt/ng2-fileupload/issues"},"dist":{"shasum":"d57994692a0566a3d6128ea368636f501662da8f","tarball":"https://registry.npmjs.org/@99xt/ng2-fileupload/-/ng2-fileupload-0.0.2.tgz","integrity":"sha512-OmrWkoH+Fx0FtY76AHmH93Bm/cNvM682gnG3ZuLVXgbuA2UpT3zZ8yegIxj4k6uvSpV2gbJBJ6kF5wv9SuUaPw==","signatures":[{"sig":"MEYCIQDakhOj8AXYl5LR5rPbZ+IETpjFdPHaSnWCXx6TUGP/kAIhAKvADtm4rTm8BNdUVe7sCXVtyMoj+ZQ8oeodLC4l00bT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":"dist","module":"ng2-fileupload.js","_shasum":"d57994692a0566a3d6128ea368636f501662da8f","scripts":{},"typings":"ng2-fileupload.d.ts","_npmUser":{"name":"thinkholic","email":"mailtokasun@gmail.com"},"_resolved":"file:dist","repository":{"url":"git+https://github.com/99xt/ng2-fileupload.git","type":"git"},"_npmVersion":"3.10.10","description":"Simpler file upload implementation for angular2 apps","directories":{},"_nodeVersion":"6.11.0","peerDependencies":{"rxjs":"^5.1.0","zone.js":"^0.8.4","@angular/core":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ng2-fileupload-0.0.2.tgz_1499847689723_0.022336177062243223","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-06-30T15:57:41.094Z","modified":"2024-07-05T10:25:47.421Z","0.0.1":"2017-06-30T15:57:41.094Z","0.0.2":"2017-07-12T08:21:30.026Z"},"maintainers":[{"email":"itadmin@99x.io","name":"99xtechnology"}],"author":{"name":"thinkholic","email":"mailtokasun@gmail.com"},"repository":{"url":"git+https://github.com/99xt/ng2-fileupload.git","type":"git"},"keywords":[],"license":"MIT","homepage":"https://github.com/99xt/ng2-fileupload#readme","bugs":{"url":"https://github.com/99xt/ng2-fileupload/issues"},"readme":"# @99xt/ng2-fileupload\n\n[![npm (scoped)](https://img.shields.io/npm/v/@99xt/ng2-fileupload.svg)]()\n[![license](https://img.shields.io/github/license/99xt/ng2-fileupload.svg)]()\n\nSimpler file upload implementation for angular2 apps.\n\n## Installation\n\nTo install this library, run:\n\n```bash\nnpm install @99xt/ng2-fileupload --save\n```\n\n## Usage\n\nexample.module.ts\n```typescript\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\n\nimport { ExampleComponent } from './example.component';\n\n// Import the library\nimport { FileUploadModule } from '@99xt/ng2-fileupload';\n\n@NgModule({\n  declarations: [\n    ExampleComponent\n  ],\n  imports: [\n    BrowserModule,\n    FileUploadModule\n  ],\n  providers: [],\n  bootstrap: [ ExampleComponent ]\n})\nexport class ExampleModule { }\n```\n\nexample.component.ts\n```typescript\nexport class ExampleComponent {\n  allowedTypes: any;\n  allowedSize: number;\n  multiple: boolean;\n\n  files: any;\n  \n  constructor() {\n    this.allowedTypes = [ 'text/markdown' ];\n    this.allowedSize = 15; // MB\n    this.multiple = true;\n  }\n\n  onUploadFiles(evt: any) {\n    if (evt.error) {\n        throw evt.error;\n    }\n\n    const files = evt.files;\n    // You can run upload script here\n  }\n}\n```\n\nexample.component.html\n```html\n<file-upload\n  [allowedTypes]=\"allowedTypes\"\n  [allowedSize]=\"allowedSize\"\n  [multiple]=\"multiple\"\n  (onUploadFiles)=\"onUploadFiles($event)\"\n>\n</file-upload>\n```\n\n## Contributing Guide\n\n### Setting up the development environment\n\nClone the repository to your workstation\n\n```bash\ngit clone git@github.com:99xt/ng2-fileupload.git\n```\n\nNavigate to the project directory \n\n```bash\ncd ng2-fileupload\n```\n\nInstall and build the library\n> Generate all `*.js`, `*.d.ts` files\n\n```bash\nnpm install\nnpm run build\n```\n\nYou can find the compiled version in the `dist/`\n\nCreate a symlink from the `dist` directory to the global `node_modules`\n\n```bash\ncd dist\nnpm link\n```\n\nTo lint all `*.ts` files:\n\n```bash\n$ npm run lint\n```\n\n### Run Demo app\n\n```\ncd demo\nnpm install\nnpm start\n```\n\n### Publish to NPM\n\nUpdate the version in both `package.json` and `src/package.json`;\n\n```\nnpm run build\nnpm publish dist\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}