cancel
Showing results for 
Search instead for 
Did you mean: 

Steps to implement MDK application to upload photos to Document Management Service

KazuhikoTakata
Participant
0 Kudos

Hello experts,

I would like to hear your advice to approach to my challenge.

Previously I implemented MDK application and CAP backend service using BAS productivity tools. At that time, I understand how to implement simple CRUD application and modify it.

Next, I am planning to implement MDK application and CAP backend service for below use case.

1. User will login to mobile application (iOS / Android).

2. User will input some text information.

3. User will open camera to take a photo, then click save button.

4. Save a photo to Document Management Service via REST API (create folder, then create document to that folder).

5. Save text information and folder object ID to backend OData service implemented by CAP.

6. Trigger SAP Build Process Automation Workflow via REST API passing folder object ID for further workflow.

Until 2 it is same as previous project, and regarding 3, attachment may be appropriate for my purpose.

Then I am stuck at 4 how do I pass photo file to Document Management Service REST API.

UploadMedia may be appropriate for this, but I do not have OData service including Stream. Also, I have REST API instead of OData for uploading file.

Any kind of advice are helpful to go forward. Thanks in advance.

Best regards,

Kazuhiko Takata

View Entire Topic
bill_froelich
Product and Topic Expert
Product and Topic Expert

In step 4 (and 6) since you are using a REST API you will need to handle the work to get and format the attachment and in your rule call sendRequest to call the REST API. You will also need to make sure your REST API is defined as a destination in Mobile Services with the appropriate authentication in order to pass the call to that API.

You will not be able to use Upload Media since you are not working with an OData endpoint.

KazuhikoTakata
Participant
0 Kudos

Hi bill.froelich

Thanks for your response. I will try to connect to REST API referring to Consume a REST API in an MDK App.