Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
8e8c14b1
Commit
8e8c14b1
authored
Aug 10, 2018
by
Menethil
Browse files
修复图片上传未返回Bug
parent
86b01d7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminStorageController.java
View file @
8e8c14b1
...
@@ -50,8 +50,10 @@ public class AdminStorageController {
...
@@ -50,8 +50,10 @@ public class AdminStorageController {
return
ResponseUtil
.
unlogin
();
return
ResponseUtil
.
unlogin
();
}
}
String
originalFilename
=
file
.
getOriginalFilename
();
String
originalFilename
=
file
.
getOriginalFilename
();
storageService
.
store
(
file
.
getInputStream
(),
file
.
getSize
(),
file
.
getContentType
(),
originalFilename
);
String
url
=
storageService
.
store
(
file
.
getInputStream
(),
file
.
getSize
(),
file
.
getContentType
(),
originalFilename
);
return
ResponseUtil
.
ok
();
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"url"
,
url
);
return
ResponseUtil
.
ok
(
data
);
}
}
@PostMapping
(
"/read"
)
@PostMapping
(
"/read"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment