Skip to content

Commit

Permalink
Store temporary files created for Camera in the media folder.
Browse files Browse the repository at this point in the history
bmarty committed Feb 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 5373425 commit 8f9695a
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/+picker.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Store temporary files created for Camera in the media folder.
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@
<paths>
<files-path
name="external_files"
path="." />
</paths>
path="media" />
</paths>

0 comments on commit 8f9695a

Please sign in to comment.