cancel
Showing results for 
Search instead for 
Did you mean: 

Attachment in mobile services Can anyone guide me on how to set it up?

NoGu
Explorer
0 Kudos
279

I am using the attachment tool to capture images from the mobile device, how should I set it up so that the captured images are sent to a server and I can refer to them when I need them, where can I find documentation, what do you recommend I do? 

View Entire Topic
bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

From your metadata you have a three level hierarchy  Equipment > Failure > Files.

So assuming the equipment already exists you could call CreateRelatedEntity to create the failure and associate it to the equipment.  Then call CreateRelatedEntity again to create the files entity relating it to the new failure and finally call UploadStream to store the attachment in the download property of the files entity.  

From the metadata it does not look like you can attach more than one file to the failure so you don't need to worry about looping over the list of attachments.  If it is desired to attach more than one you would need to modify your backend service to support a Collection of files associated to the failure.

NoGu
Explorer
0 Kudos

Hi @bill_froelich ,  do you know if there is any documentation where I can see an example of how I can call the UploadStream or how to make the modification to attach the collection of files?, sorry I am starting on this path and I don't know how to do some things.

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

For Upload Stream you can take a look at the documentation.  For changes to your backend service I am unable to help there as it will depend how you are creating the service (CAP, Netweaver, ECC, S/4HANA, etc).