-2

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

2 Answers2

2

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

  • I tried the code again after the syntax errors were corrected and got the following: http://i.stack.imgur.com/hqr9F.png – lrussell123 Jan 22 '14 at 17:58
  • You have another server running on the same port. You'll need to kill that one first or use a different port for the node server. – Ray Nicholus Jan 22 '14 at 18:02
  • Okay, I switched the server port; now it runs without error, but I can't find where to change the port client-side. Where can I do this? – lrussell123 Jan 24 '14 at 14:31
  • Update: it decided to work on the default port of 8000 today. However, the file upload still fails. Any ideas? – lrussell123 Jan 24 '14 at 14:40
1

In order to handle requests from Fine Uploader, your server must properly parse multipart encoded POST requests at a minimum. It looks like you have chosen Java, and the Java server-side examples. You will need to setup a web server (using Tomcat or Jetty for instance) and include all three example files. The MultipartUploadParser, which parses the MPE request, the RequestParser, which reads Fine Uploader specific data in the request, and UploadReceiver, which contains most of the upload handling logic.

Ray Nicholus
  • 19,538
  • 14
  • 59
  • 82
  • We already have a webserver in place (IIS). I just linked the java files as an example. We would prefer to use the vb.net files as that is what we are more familiar with. The part that is confusing me is this: how do I implement that vb.net file on the server? Do I run it at startup as a script? When I try to run the file in the repository as a script, it throws 'Expected Identifier.' – lrussell123 Jan 21 '14 at 16:39
  • Also, are there any turn-key server solutions we can use here? The reason we bought fine-uploader was to avoid having to write all this code ourselves. I know you have code posted in the repositories, but I am not skilled enough to understand how this code is supposed to pieced together. I see posts in other conversations on this topic saying that the server-side code is 'trivial.' That may be true for people versed in such topics, but for me none of it makes much sense. – lrussell123 Jan 22 '14 at 15:22
  • Fine Uploader is a software library for software developers, and not non-technical end users. The simplest examples involve asking Fine Uploader to upload files directly to AWS S3 from the browser. The server-side code for this is very minimal (and supplied for many languages in the fine-uploader-server Github repo). An even simpler setup involves no server code, but there are some trade-offs. You can read about the latter approach at http://blog.fineuploader.com/2014/01/15/uploads-without-any-server-code/. – Ray Nicholus Jan 22 '14 at 15:28
  • Okay, then could you help me sort out the errors I'm having? 1. We want to place the files on our local web server (where the page hosting the fineupload client script is located) 2. We would prefer to use vb.net as that is what we are accustomed to. 3. I have tried running the vb.net code in the repository as a script and have received the errors listed previously. Is this not the correct approach? If not, how _exactly_ do I implement this so we can get up and running? – lrussell123 Jan 22 '14 at 15:53
  • Setting up your server environment is beyond the support that comes along with Fine Uploader. Your best bet is to find an IT person or software developer to assist with this and/or post a generic question on Stack Overflow with the appropriate tags and details about your code, environment, and attempts. – Ray Nicholus Jan 22 '14 at 15:59
  • I have tried the server set-up guide aimed at 'beginners'. I followed the instructions to the letter, yet I receive an error (listed above). Does the code on your site contain errors? See at the following link: http://docs.fineuploader.com/quickstart/03-setting_up_server.html – lrussell123 Jan 22 '14 at 16:02
  • The code in the getting started guide does not contain any errors. – Ray Nicholus Jan 27 '14 at 00:57
  • @lrussell123 I’m really sorry, but I can’t spend any more time on this. The server examples show you how to handle the requests sent by Fine Uploader. They are not meant to be examples of a complete web application server. It seems like you are struggling with some basic concepts of web application development here based on this question and others (some of which you also deleted), and I strongly suggest you pass this off to someone on your team who has some background in development. – Ray Nicholus Jan 28 '14 at 13:41
  • @lrussell123 This is a library for other software developers to aid them in process of allowing their web application to support file uploads. If you are hoping to copy and paste your way to a working web application, I would advise you to abandon this path. You will find that your frustrations will grow exponentially as the concepts to properly design and maintain a non-trivial web application become more abstract. – Ray Nicholus Jan 28 '14 at 13:41