2

/alfresco/service/api/uploadバックエンド webScriptを使用してファイルをアップロードしたいと考えています。しかし、問題は、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 形式です。ファイルの内容はどのように見えるべきか (ストリームまたはプレーン/テキスト?)。どんな助けでも大歓迎です。

4

1 に答える 1

1

必須フィールドは次のとおりです。

  • "filedata" : FileSystemResource(JAVA)です
  • destination : フォルダーの nodeRef です。
  • uploaddirectory : その nodeRef 内の宛先ディレクトリです。

他のフィールドはオプションです。

更新:

JAVA HEREで alfresco repositoy にアップロードする例を次に示します。彼らが使用する例ではsiteidcontaineridこれらのフィールドは置き換えdestinationられ、連続してサイト名とそのサイト内のフォルダーになります。

于 2014-05-23T08:52:19.777 に答える