diff --git a/app/src/main/java/jp/atled/agileworks/view/ui/documentweb/DocumentWebDownload.kt b/app/src/main/java/jp/atled/agileworks/view/ui/documentweb/DocumentWebDownload.kt index 92c564e0090f33a3a8063bafb7332cabe96ad6bb..9f6d385bac18a07a0b1a1a6e6ca5d34e3008b85b 100644 --- a/app/src/main/java/jp/atled/agileworks/view/ui/documentweb/DocumentWebDownload.kt +++ b/app/src/main/java/jp/atled/agileworks/view/ui/documentweb/DocumentWebDownload.kt @@ -63,7 +63,18 @@ class DocumentWebDownloader(private val handlingFragment: Fragment, private val */ fun handleFileChooseResult(resultCode: Int, data: Intent?) { filePathCallback?.let { - val uris = WebChromeClient.FileChooserParams.parseResult(resultCode, data) + val clipdata = data?.clipData + var uris = WebChromeClient.FileChooserParams.parseResult(resultCode, data) + + if (clipdata != null) { + var uriList: MutableList = mutableListOf() + val loopcount = clipdata.itemCount - 1 + for (i in 0..loopcount) { + uriList.add(clipdata.getItemAt(i).uri) + } + uris = uriList.toTypedArray() + } + it.onReceiveValue(uris) } filePathCallback = null