I want to use the backend webScript /alfresco/service/api/upload
to upload a file. But the problem is that I have no Idea what the JSON that I have to send on POST should looks like. However I know what are the parameters :
- filedata, (mandatory) HTML type file You must specify one of:
destination (the folder NodeRef where the node will be created)
updateNodeRef (the NodeRef of an existing node that will be updated)
- siteid and containerid (the Site name and the container in that site where the document will be created)
- uploaddirectory : name of the folder (either in the site container or the destination) where the document will be uploaded. This folder must already exist
- description : Description for a version update (versionDescription)
- contenttype : The content type that this document should be specialised to
- majorversion
- overwrite
- thumbnails
Now what I need is the JSON format. What the file content should look like (stream or plain/text?). Any help will be appreciated.