apoc.util.s3.S3UploadUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apoc-common Show documentation
Show all versions of apoc-common Show documentation
Data types package for Neo4j Procedures
package apoc.util.s3;
import com.amazonaws.services.s3.AmazonS3;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URL;
public class S3UploadUtils {
private S3UploadUtils() {}
public static OutputStream writeFile(String s3Url) throws IOException {
S3Params s3Params = S3ParamsExtractor.extract(new URL(s3Url));
S3Aws s3Aws = new S3Aws(s3Params, s3Params.getRegion());
AmazonS3 s3 = s3Aws.getClient();
return new S3OutputStream(s3, s3Params.getBucket(), s3Params.getKey());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy