|
@@ -41,7 +41,8 @@ public class LostFoundController {
|
|
|
responseResult.setResultCode(ResultCode.FAILED_COMMON);
|
|
responseResult.setResultCode(ResultCode.FAILED_COMMON);
|
|
|
responseResult.setMessage("发布失败");
|
|
responseResult.setMessage("发布失败");
|
|
|
|
|
|
|
|
- String postPhotoDir = request.getSession().getServletContext().getRealPath("/resources/image/post") + File.separator;
|
|
|
|
|
|
|
+ //String postPhotoDir = request.getSession().getServletContext().getRealPath("/resources/image/post") + File.separator;
|
|
|
|
|
+ String postPhotoDir = "/file/shiwushu/post/";
|
|
|
File bgDirFile = new File(postPhotoDir);
|
|
File bgDirFile = new File(postPhotoDir);
|
|
|
if (!bgDirFile.exists()) {
|
|
if (!bgDirFile.exists()) {
|
|
|
bgDirFile.mkdirs();
|
|
bgDirFile.mkdirs();
|
|
@@ -58,7 +59,8 @@ public class LostFoundController {
|
|
|
out.flush();
|
|
out.flush();
|
|
|
out.close();
|
|
out.close();
|
|
|
|
|
|
|
|
- lostFound.setPhotoUrl("/resources/image/post/" + userId + fileName);
|
|
|
|
|
|
|
+ //lostFound.setPhotoUrl("/resources/image/post/" + userId + fileName);
|
|
|
|
|
+ lostFound.setPhotoUrl(userId + fileName);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
responseResult.setMessage("发布失败");
|
|
responseResult.setMessage("发布失败");
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|