Amazon S3 File Transfer

Provides file upload and download wrapper classes for Amazon AWS SDK (c) 2017 Sport Trades Ltd

Лицензия

Лицензия

Группа

Группа

com.buabook
Идентификатор

Идентификатор

amazon-s3-file-transfer
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Amazon S3 File Transfer
Provides file upload and download wrapper classes for Amazon AWS SDK (c) 2017 Sport Trades Ltd
Ссылка на сайт

Ссылка на сайт

http://buabook.github.io
Система контроля версий

Система контроля версий

https://github.com/BuaBook/amazon-s3-file-transfer.git

Скачать amazon-s3-file-transfer

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.buabook/amazon-s3-file-transfer/ -->
<dependency>
    <groupId>com.buabook</groupId>
    <artifactId>amazon-s3-file-transfer</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.buabook/amazon-s3-file-transfer/
implementation 'com.buabook:amazon-s3-file-transfer:1.0.1'
// https://jarcasting.com/artifacts/com.buabook/amazon-s3-file-transfer/
implementation ("com.buabook:amazon-s3-file-transfer:1.0.1")
'com.buabook:amazon-s3-file-transfer:jar:1.0.1'
<dependency org="com.buabook" name="amazon-s3-file-transfer" rev="1.0.1">
  <artifact name="amazon-s3-file-transfer" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.buabook', module='amazon-s3-file-transfer', version='1.0.1')
)
libraryDependencies += "com.buabook" % "amazon-s3-file-transfer" % "1.0.1"
[com.buabook/amazon-s3-file-transfer "1.0.1"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
com.google.guava : guava jar 21.0
org.slf4j : slf4j-api jar 1.7.22
com.amazonaws : aws-java-sdk-s3 jar 1.11.93

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.mockito : mockito-all jar 1.10.19
org.hamcrest : java-hamcrest jar 2.0.0.0

Модули Проекта

Данный проект не имеет модулей.

Amazon S3 File Transfer Library

This library provides file upload and download wrapper classes for the AWS S3 SDK.

Maven Central Build Status Coverage Status

Uploading

We wrap a TransferManager with the following features:

  • Application environment path prefix
    • This allows multiple environments to use the same S3 bucket but data separation at the root level of the bucket between them. The environment can be specified as any String.
  • Automatic content length calculation
  • Files downloaded straight to String

Uploading can be performed in 3 ways, each allow the caller to do more configuration:

  • Using an UploadContent object - requires supplying the file content as a String along with a file name for the upload.
  • Using a file name and InputStream
  • Using your own PutObjectRequest

Modifying Uploaded File Permissions

By default the permissions of a newly uploaded file will be inherited from the parent folder or bucket. If you want to upload a file with different permissions, you can use the uploadSync method directly, supplying your own PutObjectRequest:

PutObjectRequest uploadRequest = s3FileUploader.getNewPutObjectRequest(s3Path, fileDataInputStream, fileDataLength);
// Allow everyone to read uploaded file
uploadRequest.setCannedAcl(CannedAccessControlList.PublicRead);

try {
    s3FileUploader.uploadSync(uploadRequest);
} catch (AmazonClientException | IllegalArgumentException e) {
    log.error("Failed to upload public file to Amazon. Error - " + e.getMessage(), e);
}

Required Access Permissions

In order to either upload or download files from Amazon S3, an account must be created with the following permissions:

  • Download: GetObject
  • Upload: PutObject
com.buabook

BuaBook

Версии библиотеки

Версия
1.0.1
1.0.0