Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(issue-155): Allow multiple file upload #218

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tallulahh
Copy link

@tallulahh tallulahh commented Apr 19, 2024

Issue #, if available: 155 - #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:

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants