提交 6ac1d927 编写于 作者: F fancy

修复文档附件无法打开的bug

上级 914bb47c
......@@ -207,7 +207,6 @@ class TaskWebViewPresenter : BasePresenterImpl<TaskWebViewContract.View>(), Task
val info: AttachmentInfo? = response.data
if (info != null) {
val path = FileExtensionHelper.getXBPMWORKAttachmentFileByName(info.name)
SDCardHelper.generateNewFile(path)
val downloadUrl = APIAddressHelper.instance()
.getCommonDownloadUrl(APIDistributeTypeEnum.x_processplatform_assemble_surface, "jaxrs/attachment/download/$attachmentId/work/$workId/stream")
O2FileDownloadHelper.download(downloadUrl, path)
......@@ -284,7 +283,7 @@ class TaskWebViewPresenter : BasePresenterImpl<TaskWebViewContract.View>(), Task
val info: AttachmentInfo? = response.data
if (info != null) {
val path = FileExtensionHelper.getXBPMWORKAttachmentFileByName(info.name)
SDCardHelper.generateNewFile(path)
val downloadUrl = APIAddressHelper.instance()
.getCommonDownloadUrl(APIDistributeTypeEnum.x_processplatform_assemble_surface, "jaxrs/attachment/download/$attachmentId/workcompleted/$workCompleted/stream")
O2FileDownloadHelper.download(downloadUrl, path)
......
......@@ -24,6 +24,7 @@ object O2FileDownloadHelper {
subscriber.onCompleted()
}else {
try {
SDCardHelper.generateNewFile(outputFilePath)
val url = URL(downloadUrl)
val conn = url.openConnection() as HttpURLConnection
conn.setRequestProperty("Accept-Encoding", "identity")
......
......@@ -20,6 +20,6 @@ org.gradle.parallel=true
# o2
o2.versionName=5.1.1
o2.versionCode=111
o2.versionName=5.1.2
o2.versionCode=112
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册