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 ) ; }
Uploads part async .