Skip to content

Commit 0953879

Browse files
changxu0306richardmcclellan
authored andcommitted
updated prefix of temp file in transfer utility (#2214)
Co-authored-by: Richard McClellan <[email protected]>
1 parent 440525c commit 0953879

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

aws-android-sdk-s3/src/main/java/com/amazonaws/mobileconnectors/s3/transferutility/TransferStatusUpdater.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,12 @@ class TransferStatusUpdater {
7676
private static TransferStatusUpdater transferStatusUpdater;
7777

7878
/**
79-
* Prefix for temporary File created when client uploads an `InputStream`.
79+
* Prefix for temporary File created when client uploads an InputStream. When the
80+
* upload completes, the File is deleted, if it was created by the library, but not if it was
81+
* provided by the client. To ensure we don't delete any File objects provided by the client,
82+
* a random UUID is included in the prefix.
8083
*/
81-
static final String TEMP_FILE_PREFIX = "aws-s3";
84+
static final String TEMP_FILE_PREFIX = "aws-s3-d861b25a-1edf-11eb-adc1-0242ac120002";
8285

8386
/**
8487
* This class is instantiated by TransferService and TransferUtility.

0 commit comments

Comments
 (0)