Subversion Repositories SmartDukaan

Rev

Rev 25397 | Rev 25399 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25397 Rev 25398
Line 107... Line 107...
107
	@PostMapping(value = "/content/media/upload")
107
	@PostMapping(value = "/content/media/upload")
108
	public String uploadMediaContent(HttpServletRequest request, @RequestBody EntityMediaPojo entityMediaPojo,
108
	public String uploadMediaContent(HttpServletRequest request, @RequestBody EntityMediaPojo entityMediaPojo,
109
			Model model) throws Exception {
109
			Model model) throws Exception {
110
		ContentPojo contentPojo = mongoClient.getEntityById(entityMediaPojo.getEntityId());
110
		ContentPojo contentPojo = mongoClient.getEntityById(entityMediaPojo.getEntityId());
111
		Map<String, InputStream> fileStreamsMap = getStreamFileMap(contentPojo, entityMediaPojo);
111
		Map<String, InputStream> fileStreamsMap = getStreamFileMap(contentPojo, entityMediaPojo);
112
		mongoClient.persistEntity(contentPojo);
-
 
113
		uploadFiles(fileStreamsMap, entityMediaPojo.getEntityId());
112
		uploadFiles(fileStreamsMap, entityMediaPojo.getEntityId());
-
 
113
		mongoClient.persistEntity(contentPojo);
114
		model.addAttribute("response", mvcResponseSender.createResponseString(true));
114
		model.addAttribute("response", mvcResponseSender.createResponseString(true));
115
		return "response";
115
		return "response";
116
	}
116
	}
117
 
117
 
118
	@GetMapping(value = "/content/media")
118
	@GetMapping(value = "/content/media")