Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Multiple files uploading using Batch Operation

$
0
0

Hi Ui5 Experts,

 

I have a requirement to upload the multiple files in an application.I created the service in sap netweaver gateway and its working fine.

 

I am uploading all these files to database from UI5 application only when user clicks on save button in the application.So for this I used the Batch operation so that  all these files are sent to the server in a single request.

 

I am passing two key fields in the entity set i.e application id, filename.

 

var row1 = [ attModel.createBatchOperation(

  "/ES_SET(Appid='"

  + id

  + "',Filename='"

  + file.name + "')/$value",

  "PUT", file) ];

 

attModel.addBatchChangeOperations(row1);

 

attModel

  .submitBatch();

 

attModel refers to the  Service URI .

 

I am able to  upload the files.  But if the file name in the entity set is having spaces, I am unable to upload the files.I am receiving an error message that "Resource not found for the segment " with truncated file name  in the entity set

 

So please suggest me on this.

 

 

Regards,

Prashanth


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>