try getting real filename from content uri at Edit Activity
This commit is contained in:
parent
5e44ce356c
commit
c0c7752f79
|
@ -188,6 +188,11 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
|||
} else if (saveUri.scheme == "content") {
|
||||
var newPath = applicationContext.getRealPathFromURI(saveUri) ?: ""
|
||||
var shouldAppendFilename = true
|
||||
if (newPath.isEmpty()) {
|
||||
newPath = applicationContext.getFilenameFromContentUri(saveUri) ?: ""
|
||||
shouldAppendFilename = false
|
||||
}
|
||||
|
||||
if (newPath.isEmpty()) {
|
||||
newPath = "$internalStoragePath/${getCurrentFormattedDateTime()}.${saveUri.toString().getFilenameExtension()}"
|
||||
shouldAppendFilename = false
|
||||
|
|
Loading…
Reference in New Issue