IBM Connections API - Uploading files in a community and getting nonce - Widget

假如想象 提交于 2019-12-08 04:59:04

问题


There is a requirement to upload a file into a Community from an widget ( instead of going to files sections within a community and upload )

  1. Can we upload files from an widget into a Community Files Section. I found this article here which talks about uploading files, but not under Community section. Is uploading files through community section possible ? Any reference would help

  2. How do we get a Nonce in a widget ? Do we still need to pass authentication parameters, or can use those from the currently logged in user.


回答1:


You should look at http://www-10.lotus.com/ldd/appdevwiki.nsf/xpAPIViewer.xsp?lookupName=API+Reference#action=openDocument&res_title=Adding_a_file_using_a_multipart_POST_ic50&content=apicontent * however you you want to post this url pattern https://{serverUrl}/files/basic/api/communitylibrary/{communityUuid}/feed

For the nonce if you are in an iWidget specifically, you can look at the csrf_token and use that in the X-Update-Nonce header.

However, there is no guarantee that it remains named csrf_token. You should use http://www-10.lotus.com/ldd/appdevwiki.nsf/xpAPIViewer.xsp?lookupName=API+Reference#action=openDocument&res_title=Getting_a_cryptographic_key_ic50&content=apicontent



来源:https://stackoverflow.com/questions/28984433/ibm-connections-api-uploading-files-in-a-community-and-getting-nonce-widget

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!