AnsweredAssumed Answered

Help and/or Example with the file upload webscript

Question asked by dallinns on Mar 18, 2011
Latest reply on Sep 20, 2011 by jrott
I am looking at the Restful API Reference ( and trying to understand how to use the file upload web script. Currently, the api Reference seems severely under documented.

The web script uses the following HTML form data

Does this mean the service is expecting (multipart/form-data)? or is it expecting XML or something else?

filedata - (mandatory) HTML type file

What is "HTML type file"?

I tried this web script with the following form, assuming that since filedata is the only marked as mandatory that it would work
<form method='POST' enctype='multipart/form-data' action='http://localhost:8080/alfresco/service/api/upload'>
            File to upload: <input type="file" name="filedata"><br />
            <input type=submit value=Press> to upload the file!

But it returned the following:
    "status" :
    "code" : 400,
    "name" : "Bad Request",
    "description" : "Request sent by the client was syntactically incorrect."
  "message" : "Required parameters are missing", 
  "exception" : "",
  "callstack" :
  "server" : "Community v3.4.0 (b 3262) schema 4,111",
  "time" : "Mar 18, 2011 3:24:31 PM"

What parameters are missing?