Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Json Alfresco上载Webscript_Json_Upload_Alfresco_Web Scripting - Fatal编程技术网

Json Alfresco上载Webscript

Json Alfresco上载Webscript,json,upload,alfresco,web-scripting,Json,Upload,Alfresco,Web Scripting,我想使用后端webScript/alfresco/service/api/upload上传文件。但问题是,我不知道我必须在POST上发送的JSON应该是什么样子。但是,我知道参数是什么: - filedata, (mandatory) HTML type file You must specify one of: destination (the folder NodeRef where the node will be created) updateNodeRef (the Nod

我想使用后端webScript
/alfresco/service/api/upload
上传文件。但问题是,我不知道我必须在POST上发送的JSON应该是什么样子。但是,我知道参数是什么:

- 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

现在我需要的是JSON格式。文件内容应该是什么样的(流还是纯/文本?)。任何帮助都将不胜感激

必填字段为:

  • “filedata”:是一个
    文件系统资源
    (JAVA)
  • 目标:是文件夹的节点ref
  • uploaddirectory:是该节点ref内的目标目录
其他字段是可选的

上传日期:


下面是一个用JAVA上传到alfresco repositoy的示例。在本例中,它们使用
siteid
containerid
这些字段替换
destination
,依次是站点名称和该站点内的文件夹

你确定API接受JSON吗?我以为它可以处理HTML表单帖子?是的。它肯定接受JSON作为请求。你确定吗?它支持通过JSON报告结果,但我只在输入端看到对HTML表单上传的引用