We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2cd0370 commit 12c70ddCopy full SHA for 12c70dd
1 file changed
src/main/kotlin/io/ionic/libs/ioncameralib/helper/IONCAMRFileHelper.kt
@@ -566,7 +566,7 @@ class IONCAMRFileHelper: IONCAMRFileHelperInterface {
566
var read: Int
567
val buffer = ByteArray(8 * 1024)
568
val extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType) ?: "dat"
569
- val targetFile = createCaptureFile(context, "file.${extension}")
+ val targetFile = createCaptureFile(context, "${UUID.randomUUID()}.${extension}")
570
val outputStream: OutputStream = FileOutputStream(targetFile)
571
while (inputStream.read(buffer).also { read = it } != -1) {
572
outputStream.write(buffer, 0, read)
@@ -579,4 +579,4 @@ class IONCAMRFileHelper: IONCAMRFileHelperInterface {
579
}
580
return targetFile
581
582
-}
+}
0 commit comments