Description of changes: Allow multiple file selection and upload.
While working on a project we required this feature, this code enabled us to select multiple files and upload them.
What was done:
updated b-form-file element to use multiple
updated data to return an array for fileToUpload
updated the uploadChunk method to accept the file as a parameter and pass parameter into function. Updated all instances of this method being called.
updated the checkIfFileExists method to loop through the fileToUpload array. If no files already exist, it will loop through the files, calling the upload method on each file. When the for loop finished it will call the afterComplete method to output a successful message.
updated the upload method to accept the file parameter and pass parameter into function. Updated all instances of this method being called. Commented all calls of afterComplete from within this function, as it is being called after the loop of uploading files is complete.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available: 155 - https://github.com/aws-solutions/simple-file-manager-for-amazon-efs/issues/155
Description of changes: Allow multiple file selection and upload. While working on a project we required this feature, this code enabled us to select multiple files and upload them.
What was done:
b-form-file
element to usemultiple
fileToUpload
uploadChunk
method to accept thefile
as a parameter and pass parameter into function. Updated all instances of this method being called.checkIfFileExists
method to loop through thefileToUpload
array. If no files already exist, it will loop through the files, calling theupload
method on each file. When the for loop finished it will call theafterComplete
method to output a successful message.upload
method to accept thefile
parameter and pass parameter into function. Updated all instances of this method being called. Commented all calls ofafterComplete
from within this function, as it is being called after the loop of uploading files is complete.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.