cancel
Showing results for 
Search instead for 
Did you mean: 

How to post files to server using Upload collection - Upload Pending

0 Kudos
223

I have been using upload collection - upload pending ,

Followed same instructions as per sdk sample ,

in controller :

onStartUpload: function(oEvent) {   
var oUploadCollection = this.byId("UploadCollection"); 
var cFiles = oUploadCollection.getItems().length; 
var uploadInfo = cFiles + " file(s)";   
if (cFiles > 0) {

      oUploadCollection.upload();      MessageToast.show("Method Upload is called (" + uploadInfo + ")");
 }},

Here , on my network tab shows as the files successfully posted , but I am confused with what name (Unique control name for identification on the server side after sending data to the server.) to be referred ?

After work around inspecting in dev tools I found a form having name as : uploadCollection[] ,

for reference in my BE python-flask :

uploaded_files = request.files.getlist("uploadCollection[]")

But here i get an empty array , may i know what should be used here in place of "uploadCollection[]" -- usually it is name attribute of the file input in HTML ??

If i use JAVA , i get the current request is not a multipart request

Any help is much appreciated thanks



Accepted Solutions (0)

Answers (0)