1
我想使用後端webScript /alfresco/service/api/upload
來上傳文件。但問題是,我不知道我必須在POST上發送的JSON應該是什麼樣的。但我知道什麼是參數:Alfresco上傳Webscript
- 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格式。文件內容應該是什麼樣子(流或純文本?)。任何幫助將不勝感激。
你確定API需要JSON嗎?我認爲它適用於HTML表單文章? – Gagravarr
是的,我。它肯定接受JSON作爲請求。 – deltascience
你確定嗎?它支持通過JSON報告結果,但[查看源代碼](https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/remote-api/config /alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js)我只在輸入端看到對HTML表單上傳的引用 – Gagravarr