/** * Uploads part async. */ private void uploadPart() throws IOException { if (mFile == null) { return; } mLocalOutputStream.close(); int partNumber = mPartNumber.getAndIncrement(); File newFileToUpload = new File(mFile.getPath()); mFile = null; mLocalOutputStream = null; UploadPartRequest uploadRequest = new UploadPartRequest() .withBucketName(mBucketName) .withKey(mKey) .withUploadId(mUploadId) .withPartNumber(partNumber) .withFile(newFileToUpload) .withPartSize(newFileToUpload.length()); execUpload(uploadRequest); }
.withKey(key) .withUploadId(uploadId) .withFile(file) .withFileOffset(offset) .withPartNumber(partNumber++)
.withKey(c.getString(c.getColumnIndexOrThrow(TransferTable.COLUMN_KEY))) .withUploadId(multipartId) .withFile(new File( c.getString(c.getColumnIndexOrThrow(TransferTable.COLUMN_FILE)))) .withFileOffset(
.withUploadId(mUploadId) .withPartNumber(partNumber) .withFile(mFile) .withPartSize(mFile.length()); uploadRequest.setLastPart(true);
.withPartNumber(i) .withFileOffset(filePosition) .withFile(file) .withPartSize(partSize); partETags.add(s3Client.uploadPart(uploadRequest).getPartETag());
/** * Creates and returns an upload-part request corresponding to a ciphertext * file upon a part-creation event. * * @param event * the part-creation event of the ciphertxt file. * @param part * the created ciphertext file corresponding to the upload-part */ protected UploadPartRequest newUploadPartRequest(PartCreationEvent event, final File part) { final UploadPartRequest reqUploadPart = new UploadPartRequest() .withBucketName(req.getBucketName()) .withFile(part) .withKey(req.getKey()) .withPartNumber(event.getPartNumber()) .withPartSize(part.length()) .withLastPart(event.isLastPart()) .withUploadId(uploadId) .withObjectMetadata(req.getUploadPartMetadata()) ; return reqUploadPart; }
.withKey(key) .withUploadId(uploadId) .withFile(file) .withFileOffset(offset) .withPartNumber(partNumber++)
/** * Creates and returns an upload-part request corresponding to a ciphertext * file upon a part-creation event. * * @param event * the part-creation event of the ciphertxt file. * @param part * the created ciphertext file corresponding to the upload-part */ protected UploadPartRequest newUploadPartRequest(PartCreationEvent event, final File part) { final UploadPartRequest reqUploadPart = new UploadPartRequest() .withBucketName(req.getBucketName()) .withFile(part) .withKey(req.getKey()) .withPartNumber(event.getPartNumber()) .withPartSize(part.length()) .withLastPart(event.isLastPart()) .withUploadId(uploadId) .withObjectMetadata(req.getUploadPartMetadata()); return reqUploadPart; }
.withKey(c.getString(c.getColumnIndexOrThrow(TransferTable.COLUMN_KEY))) .withUploadId(multipartId) .withFile(new File( c.getString(c.getColumnIndexOrThrow(TransferTable.COLUMN_FILE)))) .withFileOffset(
/** * Creates and returns an upload-part request corresponding to a ciphertext * file upon a part-creation event. * * @param event * the part-creation event of the ciphertxt file. * @param part * the created ciphertext file corresponding to the upload-part */ protected UploadPartRequest newUploadPartRequest(PartCreationEvent event, final File part) { final UploadPartRequest reqUploadPart = new UploadPartRequest() .withBucketName(req.getBucketName()) .withFile(part) .withKey(req.getKey()) .withPartNumber(event.getPartNumber()) .withPartSize(part.length()) .withLastPart(event.isLastPart()) .withUploadId(uploadId) .withObjectMetadata(req.getUploadPartMetadata()); return reqUploadPart; }
.withFileOffset(filePosition).withFile(file).withPartSize(partSize);
/** * Creates and returns an upload-part request corresponding to a ciphertext * file upon a part-creation event. * * @param event * the part-creation event of the ciphertxt file. * @param part * the created ciphertext file corresponding to the upload-part */ protected UploadPartRequest newUploadPartRequest(PartCreationEvent event, final File part) { final UploadPartRequest reqUploadPart = new UploadPartRequest() .withBucketName(req.getBucketName()) .withFile(part) .withKey(req.getKey()) .withPartNumber(event.getPartNumber()) .withPartSize(part.length()) .withLastPart(event.isLastPart()) .withUploadId(uploadId) .withObjectMetadata(req.getUploadPartMetadata()) ; return reqUploadPart; }
.withUploadId(initResponse.getUploadId()).withPartNumber(i) .withFileOffset(filePosition) .withFile(file) .withPartSize(partSize);
.withPartNumber(i) .withFileOffset(filePosition) .withFile(file) .withPartSize(partSize);
.withKey(key) .withUploadId(uploadId) .withFile(file) .withFileOffset(offset) .withPartNumber(partNumber++)
.withUploadId(initResponse.getUploadId()).withPartNumber(part).withFileOffset(filePosition).withFile(filePayload).withPartSize(partSize);
.withKey(key) .withUploadId(uploadId) .withFile(file) .withFileOffset(offset) .withPartNumber(partNumber++)