Store temporary files created for Camera in the media folder.

This commit is contained in:
Benoit Marty 2024-02-16 11:51:56 +01:00
parent 53734255ec
commit 8f9695a9a8
3 changed files with 4 additions and 3 deletions

View File

@ -0,0 +1 @@
Store temporary files created for Camera in the media folder.

View File

@ -24,7 +24,7 @@ import java.util.Locale
internal fun createTemporaryMediaFile(context: Context, mediaType: MediaType): File {
val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date())
val storageDir: File = context.filesDir.also { it.mkdirs() }
val storageDir: File = File(context.filesDir, "media").also { it.mkdirs() }
val fileSuffix = when (mediaType) {
MediaType.IMAGE -> ".jpg"
MediaType.VIDEO -> ".mp4"

View File

@ -2,5 +2,5 @@
<paths>
<files-path
name="external_files"
path="." />
</paths>
path="media" />
</paths>