{"_id":"@aligorji/ngx-file-upload","_rev":"1-f3b2f2c300fb8f1de941eb6c931c46fe","name":"@aligorji/ngx-file-upload","dist-tags":{"next":"1.0.1","latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aligorji/ngx-file-upload","version":"1.0.0","description":"Angular file uploader","author":{"name":"Dmitriy Shekhovtsov","email":"valorkin@gmail.com"},"license":"MIT","peerDependencies":{"@angular/core":"^16.0.0","@angular/common":"^16.0.0"},"sideEffects":false,"publishConfig":{"registry":"https://registry.npmjs.org/","tag":"next"},"repository":{"type":"git","url":"git+ssh://git@github.com/valor-software/ng2-file-upload.git"},"bugs":{"url":"https://github.com/valor-software/ng2-file-upload/issues"},"homepage":"https://github.com/valor-software/ng2-file-upload#readme","keywords":["angular","upload file","ng","ng2","angular2"],"module":"fesm2022/ng2-file-upload.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/ng2-file-upload.mjs","esm":"./esm2022/ng2-file-upload.mjs","default":"./fesm2022/ng2-file-upload.mjs"}},"dependencies":{"tslib":"^2.3.0"},"main":"index.js","_id":"@aligorji/ngx-file-upload@1.0.0","gitHead":"6df2ee8b51fabf6ed964ba37cca5433ac7982b1e","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-4yHeFOgPoD+NPmw7DG+Bvi13cDF1K7HqGfPfUmR2BiphzXhNKg+oHc+Cms0PfNqiH/mgoeTrAIrQfWdl6/pI0w==","shasum":"e46c36bdb76acaf8b95aed248fed276edebfa9dc","tarball":"https://registry.npmjs.org/@aligorji/ngx-file-upload/-/ngx-file-upload-1.0.0.tgz","fileCount":30,"unpackedSize":235851,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfMrl70fCt0SivMjfwQnx8j4ZdTyJe6HxDYPBmVGzT5AIgaj0yGPN3eWOgnI2VqIwwRVtoQ+mjLr1QPvBNWcP3+uw="}]},"_npmUser":{"name":"a.gorji","email":"aligorji68@gmail.com"},"directories":{},"maintainers":[{"name":"a.gorji","email":"aligorji68@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-file-upload_1.0.0_1700627884705_0.8311463514953508"},"_hasShrinkwrap":false},"1.0.1":{"name":"@aligorji/ngx-file-upload","version":"1.0.1","description":"Angular file uploader","author":{"name":"Dmitriy Shekhovtsov","email":"valorkin@gmail.com"},"license":"MIT","peerDependencies":{"@angular/core":"^17.0.4","@angular/common":"^17.0.4"},"sideEffects":false,"publishConfig":{"registry":"https://registry.npmjs.org/","tag":"next"},"repository":{"type":"git","url":"git+ssh://git@github.com/valor-software/ng2-file-upload.git"},"bugs":{"url":"https://github.com/valor-software/ng2-file-upload/issues"},"homepage":"https://github.com/valor-software/ng2-file-upload#readme","keywords":["angular","upload file","ng","ng2","angular2"],"module":"fesm2022/ng2-file-upload.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/ng2-file-upload.mjs","esm":"./esm2022/ng2-file-upload.mjs","default":"./fesm2022/ng2-file-upload.mjs"}},"dependencies":{"tslib":"^2.3.0"},"main":"index.js","_id":"@aligorji/ngx-file-upload@1.0.1","readme":"# ng2-file-upload [![npm version](https://badge.fury.io/js/ng2-file-upload.svg)](http://badge.fury.io/js/ng2-file-upload) [![npm downloads](https://img.shields.io/npm/dm/ng2-file-upload.svg)](https://npmjs.org/ng2-file-upload)\r\nEasy to use Angular2 directives for files upload ([demo](http://valor-software.github.io/ng2-file-upload/))\r\n\r\n[![Angular 2 Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://github.com/mgechev/angular2-style-guide)\r\n[![Build Status](https://travis-ci.org/valor-software/ng2-file-upload.svg?branch=development)](https://travis-ci.org/valor-software/ng2-file-upload)\r\n\r\n\r\n## Quick start\r\n\r\n1. A recommended way to install ***ng2-file-upload*** is through [npm](https://www.npmjs.com/search?q=ng2-file-upload) package manager using the following command:\r\n\r\n  `npm i ng2-file-upload`\r\n\r\n  Alternatively, you can [download it in a ZIP file](https://github.com/valor-software/ng2-file-upload/archive/master.zip).\r\n\r\n2. Currently `ng2-file-upload` contains two directives: `ng2-file-select` and `ng2-file-drop`. `ng2-file-select` is used for 'file-input' field of form and\r\n  `ng2-file-drop` is used for area that will be used for dropping of file or files.\r\n\r\n3. More information regarding using of ***ng2-file-upload*** is located in\r\n  [demo](http://valor-software.github.io/ng2-file-upload/) and [demo sources](https://github.com/valor-software/ng2-file-upload/tree/master/demo).\r\n\r\n## Using ***ng2-file-upload*** in a project\r\n\r\n1. Install as shown in the above section.\r\n\r\n2. Import `FileUploadModule` into the module that declares the component using ***ng2-file-upload***:\r\n\r\n```import { FileUploadModule } from 'ng2-file-upload';```\r\n\r\n3. Add it to `[imports]` under `@NgModule`:\r\n\r\n```imports: [ ... FileUploadModule, ... ]```\r\n\r\n4. Import `FileUploader` into the component:\r\n\r\n```import {  FileUploader } from 'ng2-file-upload';```\r\n\r\n5. Create a variable for the API url:\r\n\r\n```const URL = 'path_to_api';```\r\n\r\n6. Initialize it:\r\n\r\n```public uploader:FileUploader = new FileUploader({url: URL}); ```\r\n\r\n## API for `ng2FileSelect`\r\n\r\n### Properties\r\n\r\n  - `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)\r\n\r\n### Events\r\n - `onFileSelected` - fires when files are selected and added to the uploader queue\r\n\r\n## API for `ng2FileDrop`\r\n\r\n### Properties\r\n\r\n  - `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)\r\n\r\n  Parameters supported by this object:\r\n\r\n  1. `url` - URL of File Uploader's route\r\n  2. `authToken` - Auth token that will be applied as 'Authorization' header during file send.\r\n  3. `disableMultipart` - If 'true', disable using a multipart form for file upload and instead stream the file. Some APIs (e.g. Amazon S3) may expect the file to be streamed rather than sent via a form. Defaults to false.\r\n  4. `itemAlias` - item alias (form name redefinition)\r\n  5. `formatDataFunction` - Function to modify the request body. 'DisableMultipart' must be 'true' for this function to be called.\r\n  6. `formatDataFunctionIsAsync` - Informs if the function sent in 'formatDataFunction' is asynchronous. Defaults to false.\r\n  7. `parametersBeforeFiles` - States if additional parameters should be appended before or after the file. Defaults to false.\r\n\r\n### Events\r\n\r\n  - `fileOver` - it fires during 'over' and 'out' events for Drop Area; returns `boolean`: `true` if file is over Drop Area, `false` in case of out.\r\n  See using in [ts demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts) and\r\n  [html demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.html)\r\n  - `onFileDrop` - it fires after a file has been dropped on a Drop Area; you can pass in `$event` to get the list of files that were dropped. i.e. `(onFileDrop)=\"dropped($event)\"`\r\n\r\n# Troubleshooting\r\n\r\nPlease follow these guidelines when reporting bugs and feature requests:\r\n\r\n1. Use [GitHub Issues](https://github.com/valor-software/ng2-file-upload/issues) board to report bugs and feature requests (not our email address)\r\n2. Please **always** write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.\r\n\r\nThanks for understanding!\r\n\r\n### License\r\n\r\nThe MIT License (see the [LICENSE](https://github.com/valor-software/ng2-file-upload/blob/master/LICENSE) file for the full text)\r\n","readmeFilename":"README.md","gitHead":"6df2ee8b51fabf6ed964ba37cca5433ac7982b1e","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-9c9VPd3KcX/QmKeUfj2TH1G3aEJji3e9Pt+ZmTiJhwWgIrygeRtkT4AFirI+hrAaLiaw+wRhUYukALes9NTqRg==","shasum":"82c86c3dc28d4839ef2f93e2ce06a1c7fa6f8a12","tarball":"https://registry.npmjs.org/@aligorji/ngx-file-upload/-/ngx-file-upload-1.0.1.tgz","fileCount":30,"unpackedSize":235851,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuimIKcRs4uSYu1+pkg9gj/ahHS3O7BPJTXhVWniwsDwIhAIg4hjSlFu2EDnf0txM5LTc24vu4v+Yk2x0VxepSfd2T"}]},"_npmUser":{"name":"a.gorji","email":"aligorji68@gmail.com"},"directories":{},"maintainers":[{"name":"a.gorji","email":"aligorji68@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-file-upload_1.0.1_1700628034579_0.3463247442829498"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-22T04:38:04.607Z","1.0.0":"2023-11-22T04:38:04.871Z","modified":"2023-11-22T04:40:34.925Z","1.0.1":"2023-11-22T04:40:34.748Z"},"maintainers":[{"name":"a.gorji","email":"aligorji68@gmail.com"}],"description":"Angular file uploader","homepage":"https://github.com/valor-software/ng2-file-upload#readme","keywords":["angular","upload file","ng","ng2","angular2"],"repository":{"type":"git","url":"git+ssh://git@github.com/valor-software/ng2-file-upload.git"},"author":{"name":"Dmitriy Shekhovtsov","email":"valorkin@gmail.com"},"bugs":{"url":"https://github.com/valor-software/ng2-file-upload/issues"},"license":"MIT","readme":"","readmeFilename":""}