Hi Helga,
It works for single uploader.
But I have a scenario in which I have multiple file uploaders on single page, in which I have created a global fileArray, in this fileArray I am pushing all the files of all the uploader.
So my array is like:
[{ file: File, name: “Standard_CSV.csv”, id: 1516249090028, size: 154495, sizetext: “150.87 Kb”, type: “csv”, context: undefined, status: “client”, index: “0” },
{ file: File, name: “Standard_CSV_1.csv”, id: 1516249090029, size: 154495, sizetext: “150.87 Kb”, type: “csv”, context: undefined, status: “client”, index: “0” }]
And instead of using following logic:
$$(“uploader”).files.data.each(function(obj, i){
formData.append(“file”+i, obj.file);
});
I am using:
for(i=0;i<fileArray.length;i++){
console.log(‘fileArray[i]::’+JSON.stringify(fileArray[i]));
formData.append(‘file_’+i, fileArray[i]);
}
But in such scenario it shows: In browser network instead of file data, it shows [Object Object].
So in backend it shows input stream as:[Object Object] for file.
Is there a solution for this.