Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil Trishkin committed Feb 15, 2023
1 parent 672bb84 commit fe56140
Showing 1 changed file with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import com.google.common.hash.HashCode;
import org.dcm4che3.net.Device;
import org.dcm4che3.util.AttributesFormat;
import org.dcm4chee.arc.conf.BinaryPrefix;
import org.dcm4chee.arc.conf.StorageDescriptor;
import org.dcm4chee.arc.metrics.MetricsService;
import org.dcm4chee.arc.storage.AbstractStorage;
Expand Down Expand Up @@ -94,7 +93,6 @@ public void upload(BlobStoreContext context, InputStream in, long length,
private final AttributesFormat pathFormat;
private final String container;
private final BlobStoreContext context;
private final String uploaderOverride;
private String api;
private int count;

Expand All @@ -116,7 +114,6 @@ protected CloudStorage(StorageDescriptor descriptor, MetricsService metricsServi
endpoint = api.substring(endApi + 1);
api = api.substring(0, endApi);
}
this.uploaderOverride = descriptor.getProperty("uploaderOverride", "");
ContextBuilder ctxBuilder = ContextBuilder.newBuilder(api);
String identity = descriptor.getProperty("identity", null);
if (identity != null)
Expand Down Expand Up @@ -200,18 +197,13 @@ private void upload(InputStream in, WriteContext ctx) throws IOException {
}
long length = ctx.getContentLength();
Uploader uploader = STREAMING_UPLOADER;
switch(uploaderOverride) {
case "do":
switch (api) {
case "aws-s3":
uploader = new S3Uploader();
break;
case "azureblob":
uploader = new AzureBlobUploader();
break;
default:
switch(api) {
case "aws-s3":
uploader = new S3Uploader();
break;
case "azureblob":
uploader = new AzureBlobUploader();
break;
}
}

uploader.upload(context, in, length, blobStore, container, storagePath);
Expand Down

0 comments on commit fe56140

Please sign in to comment.