We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
app.use("/edit/ue", ueditor(path.join(__dirname, 'public'), function (req, res, next) { //客户端上传文件设置 var imgDir = '/public/upload/'; var ActionType = req.query.action; if (ActionType === 'uploadimage' || ActionType === 'uploadfile' || ActionType === 'uploadvideo') { var file_url = imgDir;//默认图片上传地址 /其他上传格式的地址/ if (ActionType === 'uploadfile') { file_url = '/file/ueditor/'; //附件 } if (ActionType === 'uploadvideo') { file_url = '/video/ueditor/'; //视频 } res.ue_up(file_url); //你只要输入要保存的地址 。保存操作交给ueditor来做 res.setHeader('Content-Type', 'text/html'); } // 客户端发起图片列表请求 else if (req.query.action === 'listimage') { var dir_url = imgDir; res.ue_list(dir_url); // 客户端会列出 dir_url 目录下的所有图片 } // 客户端发起其它请求 else { res.setHeader('Content-Type', 'application/json'); res.redirect('/public/ueditor/nodejs/config.json'); } }));
The text was updated successfully, but these errors were encountered:
@yanqi321 你打开客户端 看看客户端请求报什么错
Sorry, something went wrong.
谢谢了,是图片传到其他路径里面了,尴尬
No branches or pull requests
app.use("/edit/ue", ueditor(path.join(__dirname, 'public'), function (req, res, next) {
//客户端上传文件设置
var imgDir = '/public/upload/';
var ActionType = req.query.action;
if (ActionType === 'uploadimage' || ActionType === 'uploadfile' || ActionType === 'uploadvideo') {
var file_url = imgDir;//默认图片上传地址
/其他上传格式的地址/
if (ActionType === 'uploadfile') {
file_url = '/file/ueditor/'; //附件
}
if (ActionType === 'uploadvideo') {
file_url = '/video/ueditor/'; //视频
}
res.ue_up(file_url); //你只要输入要保存的地址 。保存操作交给ueditor来做
res.setHeader('Content-Type', 'text/html');
}
// 客户端发起图片列表请求
else if (req.query.action === 'listimage') {
var dir_url = imgDir;
res.ue_list(dir_url); // 客户端会列出 dir_url 目录下的所有图片
}
// 客户端发起其它请求
else {
res.setHeader('Content-Type', 'application/json');
res.redirect('/public/ueditor/nodejs/config.json');
}
}));
The text was updated successfully, but these errors were encountered: