Multi-Step Form Upload
A multi-step form where file uploads are integrated into one of the steps alongside other form fields.
1
2
3
4
InfoAddressFilesConfirm
Personal Information
// Step 3 contains the uploader
var uploader = new MultipleUpload(el, {
uploadUrl: '/api/upload',
autoUpload: false
});
// On final step, upload all files
confirmBtn.addEventListener('click', function() {
uploader.startUpload();
});
Uploading as part of a sequence
Where files are one step among several, the transfer can run in the background while the user completes the rest. By the time they reach the end, the upload is finished and submitting costs nothing.
The queue has to survive navigation
Moving between steps must not destroy the uploader, or in-flight transfers die with it. Keep the instance alive above the step components, or persist the queue — and check its state before allowing the final submit, so a failed upload does not become a record missing its attachment.