mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	slack_import: Allow replacing uploaded data export files.
Uppy doesn't allow uploading another file and replacing the exisiting one in the same session due to `maxNumberOfFiles: 1` set by us. We don't want to remove this restriction, so only way to allow replacing files easily is to just resert the current uppy session after the last upload finishes. Our backend deletes any existing upload by default. So, this works as expected on all fronts.
This commit is contained in:
		@@ -426,6 +426,10 @@ $(() => {
 | 
			
		||||
            $("#slack-import-start-upload-wrapper").removeClass("hidden");
 | 
			
		||||
            $("#slack-import-uploaded-file-name").text(file.name!);
 | 
			
		||||
        });
 | 
			
		||||
        // Reset uppy state to allow user replace existing uploaded file.
 | 
			
		||||
        uppy.on("complete", () => {
 | 
			
		||||
            uppy.clear();
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if ($("#slack-import-poll-status").length > 0) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user