@ruc-lib/multi-file-upload
v2.0.4
Published
RUC Multifile Upload Component basically allows you to select multiple files at a time. The selected file/files will be visible below with 2 features of submit and delete option.
Downloads
6
Keywords
Readme
ruclib-multi-file-upload
RUC Multifile Upload Component basically allows you to select multiple files at a time. The selected file/files will be visible below with 2 features of submit and delete option.
Features
- When you submit the file you will get a progressbar view which represents the size of the file and the percentage of the file getting submitted so for this individually each file can be submitted to the api given via the input of the selectors.
Then second option is delete in which if :
- If there is a delete api, then it will delete file from there and if there is no any delete api then it will delete the file from the list.
Installation guide
Install complete library
npm install @uxpractice/ruc-lib
Install individual component
If users only need the multi file upload component, they can install it separately
npm install @ruc-lib/multi-file-upload
Usage
import required modules
for library
import { RuclibMultiFileUploadModule } from '@uxpractice/ruc-lib/multi-file-upload'
for seperate package
import { RuclibMultiFileUploadModule } from '@ruc-lib/multi-file-upload'
use component selector
<uxp-ruclib-multi-file-upload [rucInputData]="inputObjectDataMultiFileUpload"
[customTheme]="customTheme" (rucEvent)="passEvent($event)"></uxp-ruclib-multi-file-upload>
Input and Output
Inputs
rucInputData -> It is the configuration to be passed in the multi-file upload component.
customTheme -> It is the name of the theme.
Output
rucEvent -> is the event which will be fired when file is uploaded or deleted.
rucInputData (sample object)
Detail definition of the each property can be found in type definition file.
inputObjectDataMultiFileUpload = {
multifileSelection: true,
displayThumbnail: true,
label: 'Choose File',
uploadUrl: '/api/upload',
deleteUrl: '/api/delete',
};
Contribution
Contributions are welcome! Feel free to open issues or pull requests for any enhancements or fixes.
Acknowledgements
Thank you for choosing the Multi file upload Component Library. If you have any feedback or suggestions, please let us know!