Commit e40cef0d authored by yinjiacheng's avatar yinjiacheng

fix 图片服务-选择图片id错误 图片服务-上传压缩后的图片

parent 7427ee2b
...@@ -125,7 +125,7 @@ class ImageService : ZapService() { ...@@ -125,7 +125,7 @@ class ImageService : ZapService() {
result.forEach { result.forEach {
picList.add( picList.add(
SelectedImageBean( SelectedImageBean(
result[0].id.toString(), it.id.toString(),
Base64.encodeToString(FileInputStream(it.compressPath).readBytes(), Base64.DEFAULT) Base64.encodeToString(FileInputStream(it.compressPath).readBytes(), Base64.DEFAULT)
) )
) )
...@@ -196,7 +196,7 @@ class ImageService : ZapService() { ...@@ -196,7 +196,7 @@ class ImageService : ZapService() {
} }
} }
uploadPic?.let { uploadPic?.let {
val file = File(it.realPath) val file = File(it.compressPath)
if (!file.exists()) { if (!file.exists()) {
resolver.fail(CODE_FILE_NOT_EXIST, "file not exist", "文件不存在") resolver.fail(CODE_FILE_NOT_EXIST, "file not exist", "文件不存在")
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment