NutzCN Logo
问答 rkcms中配置logo上传问题,文件上传成功但返回unauthorized.html文件
发布于 2894天前 作者 汉歌 1602 次浏览 复制 上一个帖子 下一个帖子
标签:

上传文件提交地址为
http://localhost:8888/rk_cms/admin/file/upload.rk
正文显示
{"type":"success","content":"成功"}

	@At
	@AdaptBy(type = UploadAdaptor.class, args = { "ioc:upload" })
	@Ok("json")
	public Message upload(@Param("fileType") FileInfo.FileType fileType, @Param("file") TempFile tempFile, HttpServletRequest req, AdaptorErrorContext errCtx) throws IOException {
	    if (Lang.isEmpty(tempFile)) {
		if (Lang.isEmpty(errCtx)) {
		    return Message.warn("admin.error.message", req);
		} else {
			return Message.warn(errCtx.getAdaptorErr().getMessage(), req);
		}
	    }
	    String path = req.getSession().getServletContext().getRealPath("");
	    fileService.upload(fileType, tempFile,path, true);
	    return Message.success("Message.Type.success", req);
	}
4 回复

明明返回成功值,但是又出现没有验证权限,而且图片已上传OK

这个只能找"科技"看看了 @Rekoe

@wendal(wendal) 文件上传成功,而且action返回的状态是OK,但是依然在浏览器中有文件下载,应该是下载文件错误

"依然在浏览器中有文件下载" 开Chrome控制台看看访问了啥

添加回复
请先登陆
回到顶部