Skip to content

Commit

Permalink
Merge pull request #5358 from jay-hodgson/SWC-6765
Browse files Browse the repository at this point in the history
SWC-6765: remove legacy multi-part uploader and associated tests
  • Loading branch information
xschildw authored Apr 20, 2024
2 parents 4ad4bfc + 04e33bc commit 490c0e0
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 1,401 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@
import org.sagebionetworks.web.client.widget.upload.FileHandleLink;
import org.sagebionetworks.web.client.widget.upload.FileHandleUploadWidget;
import org.sagebionetworks.web.client.widget.upload.ImageUploadView;
import org.sagebionetworks.web.client.widget.upload.MultipartUploaderImpl;
import org.sagebionetworks.web.client.widget.user.UserBadge;
import org.sagebionetworks.web.client.widget.verification.VerificationSubmissionModalViewImpl;
import org.sagebionetworks.web.client.widget.verification.VerificationSubmissionRowViewImpl;
Expand Down Expand Up @@ -863,6 +862,4 @@ public interface PortalGinInjector extends Ginjector {
FollowingPagePresenter getFollowingPagePresenter();

ColumnModelsEditorWidget getColumnModelsEditorWidget();

MultipartUploaderImpl getLegacyMultipartUploader();
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ public class Uploader
private SynapseJSNIUtils synapseJsniUtils;
private GlobalApplicationState globalAppState;
private GWTWrapper gwt;
MultipartUploader multiPartUploader;
MultipartUploader legacyMultiPartUploader;
private MultipartUploader multiPartUploader;
AuthenticationController authenticationController;

private String[] fileNames;
Expand Down Expand Up @@ -125,7 +124,6 @@ public Uploader(
this.jsClient = jsClient;
this.synapseProperties = synapseProperties;
this.eventBus = eventBus;
legacyMultiPartUploader = ginInjector.getLegacyMultipartUploader();
view.setPresenter(this);
}

Expand Down Expand Up @@ -671,11 +669,8 @@ public void directUploadStep2(String fileName) {
view
);
} else {
// TODO: PLFM-8252: If Google Cloud platform Synapse solution supports parallel upload, then remove legacyMultiPartUploader (and all associated code)
MultipartUploader currentUploader = currentUploadType == UploadType.S3
? multiPartUploader
: legacyMultiPartUploader;
currentUploader.uploadFile(
// SWC-6765: Uses react implementation for uploading a file in all cases
multiPartUploader.uploadFile(
fileName,
contentType,
currentFile,
Expand Down
Loading

0 comments on commit 490c0e0

Please sign in to comment.