设置上传服务器 [英] Setting up an upload server
问题描述
我在文档"部分中找到了服务器脚本存储库,但是我无法让它们中的任何一个运行.
I have found the server scripts repository in the documents section, but I'm having trouble getting any of them to run.
例如,当我尝试使用javascript文件时,会遇到许多语法错误,第一个是预期的标识符,字符串或数字".
When I try the javascript file, for instance, I get numerous syntax errors, the first one being 'Expected identifier, string or number.'
我不是Java专家,所以我可能缺少明显的东西.
I'm not much of a java whiz, so I may be missing something obvious.
这是我要使用的文件: https://github.com/Widen/fine-uploader -server/blob/master/java/MultipartUploadParser.java
This is the file I'm trying to use: https://github.com/Widen/fine-uploader-server/blob/master/java/MultipartUploadParser.java
推荐答案
看看js代码,两行跳闸错误
Looking at the js code, two lines are tripping errors
console.log('>> Node.js server listening on port: ' app.get('port'));
应该不是
console.log('>> Node.js server listening on port: ' + app.get('port'));
和
}
// The endpoint for uploads
app.post("/uploads", function (req, res, next) {
应该不是
});
// The endpoint for uploads
app.post("/uploads", function (req, res, next) {
仅复制和粘贴示例server.js并在节点中运行它不起作用...
simply copying and pasting the example server.js and running it in node does not work...
完成这两个更改后,节点给出错误,无法找到模块"express"
once those two changes are made, node gives an error cannot find module 'express'
编辑- 快速安装-g不起作用.必须使用npm install express 现在出现错误
Edit - express install -g doesn't work. had to use npm install express now getting error
app.configure(function....
应用未定义-第14行
这篇关于设置上传服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!