Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
342 views
in Technique[技术] by (71.8m points)

fine uploader - 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.

When I try the javascript file, for instance, I get numerous syntax errors, the first one being 'Expected identifier, string or number.'

I'm not much of a java whiz, so I may be missing something obvious.

This is the file I'm trying to use: https://github.com/Widen/fine-uploader-server/blob/master/java/MultipartUploadParser.java

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Looking at the js code, two lines are tripping errors

console.log('>> Node.js server listening on port: ' app.get('port'));

should that not be

console.log('>> Node.js server listening on port: ' + app.get('port'));

and

}

// The endpoint for uploads
app.post("/uploads", function (req, res, next) {

should that not be

});

// The endpoint for uploads
app.post("/uploads", function (req, res, next) {

simply copying and pasting the example server.js and running it in node does not work...

once those two changes are made, node gives an error cannot find module 'express'

Edit - express install -g doesn't work. had to use npm install express now getting error

app.configure(function....

app is not defined - line 14


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...