Skip to content

Commit 8f9695a

Browse files
committed
Store temporary files created for Camera in the media folder.
1 parent 5373425 commit 8f9695a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

changelog.d/+picker.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Store temporary files created for Camera in the media folder.

library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import java.util.Locale
2424

2525
internal fun createTemporaryMediaFile(context: Context, mediaType: MediaType): File {
2626
val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date())
27-
val storageDir: File = context.filesDir.also { it.mkdirs() }
27+
val storageDir: File = File(context.filesDir, "media").also { it.mkdirs() }
2828
val fileSuffix = when (mediaType) {
2929
MediaType.IMAGE -> ".jpg"
3030
MediaType.VIDEO -> ".mp4"

library/multipicker/src/main/res/xml/multipicker_provider_paths.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
<paths>
33
<files-path
44
name="external_files"
5-
path="." />
6-
</paths>
5+
path="media" />
6+
</paths>

0 commit comments

Comments
 (0)