New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

com.buabook:amazon-s3-file-transfer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.buabook:amazon-s3-file-transfer

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

  • 1.0.1
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

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

FAQs

Package last updated on 30 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc