Actually i need to upload multiple image same time in amazon s3 server. Here is my Single File upload code here::
TransferObserver transferObserver = transferUtility.upload(
"selfiesharedev", /* The bucket to upload to */
mini_image_path, /* The key for the uploaded object */
file, /* The file where the data to upload exists */
CannedAccessControlList.PublicRead
);
Please Check this out !
TransferManager tm = new TransferManager(myCredentials);
ObjectMetadataProvider metadataProvider = new ObjectMetadataProvider() {
void provideObjectMetadata(File file, ObjectMetadata metadata) {
// If this file is a JPEG, then parse some additional info
// from the EXIF metadata to store in the object metadata
if (isJPEG(file)) {
metadata.addUserMetadata("original-image-date",
parseExifImageDate(file));
}
}
}
MultipleFileUpload upload = tm.uploadFileList(
myBucket, myKeyPrefix, rootDirectory, fileList, metadataProvider);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With