简体   繁体   中英

How to upload multiple files simultaneously using create_deep_entity method?

As we all know we can upload files using create_stream method in SAP Gateway(oData).

I want to upload multiple files using Create_Deep_entity along with create_stream method.

How to achieve the same.

In a standard way it is impossible for now. Only one attachment per one call.

However you can try the following trick with DEEP_INSERT method:

  1. Place your multi-entity table structure into service model
  2. Call service with $expand property, it will call CREATE_DEEP_ENTITY method sequentially
  3. Redefine the logic of CREATE_DEEP_ENTITY method

Read these articles for more details

Uploading Files to SAP GW – New Techniques

How to Add Multiple Entities in One Operation in OData Service

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM