Document Repository Viewer
In the Face Recognition App, I used the Document Repository service to save the images of persons. One of the things I noticed about this service, it has no out-of-the-box application to view your documents. In my opinion, this is an important missing feature. Especially, when you’re doing some tests… You never know for sure if your upload was successful. If you upload something, you need to validate the result in the document repository. Also, when you upload a wrong image and want to delete it, you first need to implement the delete function in your app… Besides that, there are many other situations that you want to view the documents that you have uploaded in the Document Repository.
(More information about the Face Recognition app: https://blogs.sap.com/2019/05/28/face-recognition-app/ )
For this reason, I created a very simple app to view, upload and delete documents in the SAP Cloud Platform Document Service. Images will show a preview, other documents can be opened via a link.
Activate the Document Repository Service
Activate the Document Service in you SCP account:
Go to Services and search for Document Service. This should be enabled by default, otherwise you need to enable it yourself.
Once it’s active (normally this is active by default), you’ll can open it directly from “Document Repositories”:
Create a repository:
And fill in all the details. Note down the Repository Key, you’ll need it later:
Install your proxy
Build a Proxy Bridge like explained in SAP Help:
Deploy this Proxy Bridge on your SCP account by using the Eclipse tools or directly in the SCP Cockpit:
Create a destination to access the proxy bridge in the UI5 app in SCP and SAP Web IDE.
Name=documentservicewl URL=https://cmisproxysaps0007914286trial.hanatrial.ondemand.com ProxyType=Internet Type=HTTP Authentication=BasicAuthentication Description=Connection to Proxy Bridge App Wouter Lemaire Userfirstname.lastname@example.org Password=xxxx
Get the app from the following GitHub Repository, you can clone it in SAP Web IDE or locally: https://github.com/lemaiwo/DocumentRepositoryViewer
Test it in the SAP Web IDE or deploy it on SCP!
Hope this will make it easier to use the SCP Document Repository service for you!