easy-file-uploader
v0.0.8-beta
Published
<easy-file-uploader (fileToUpload)="onFileBrowsed($event)" [maxFileSize]='maxFileSize' [maxFileSizeType]='maxFileSizeType' [maxNumberOfFiles]='maxNumberOfFiles' [supportedFilesTypes]='supportedFilesTypes' [isMultipleAllowed]='isMultipleAllowed'></easy-fil
Downloads
6
Keywords
Readme
Example Usage
<easy-file-uploader (fileToUpload)="onFileBrowsed($event)" [maxFileSize]='maxFileSize' [maxFileSizeType]='maxFileSizeType' [maxNumberOfFiles]='maxNumberOfFiles' [supportedFilesTypes]='supportedFilesTypes' [isMultipleAllowed]='isMultipleAllowed'>
fileToUpload: Is an output emitter that emits all the files uploaded.It emits multiple, if isMultipleAllowed was set to true.
maxFileSize,maxFileSizeType: To restrict the file size of upload send these two params.These two work in combination.So these two are needed.
supportedFilesTypes: supported file types to upload.Should be passed as an array of string.
isMultipleAllowed: Make it true if the multi file select is needed.
Examples for each Input Param:
maxFileSize: 1 maxFileSizeType: "MB" maxNumberOfFiles: 9 supportedFilesTypes: [".doc", ".docx"] isMultipleAllowed: true
Notes: FileSizeTypes supported are: ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] Pass any one among the types mentioned above.
EasyFileUploaderComponent
This library was generated with Angular CLI version 10.1.3.
Code scaffolding
Run ng generate component component-name --project easy-file-uploader
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project easy-file-uploader
.
Note: Don't forget to add
--project easy-file-uploader
or else it will be added to the default project in yourangular.json
file.
Build
Run ng build easy-file-uploader
to build the project. The build artifacts will be stored in the dist/
directory.
Publishing
After building your library with ng build easy-file-uploader
, go to the dist folder cd dist/easy-file-uploader
and run npm publish
.
Running unit tests
Run ng test easy-file-uploader
to execute the unit tests via Karma.
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.