on 2020 Oct 12 8:05 AM
I tried fetching `uploaded files` from `UploadCollection` source as :
var files = oEvent.getParameter("files");
Here i get a `fileList` type and then I have appended the same to `FormData` as
var formData = new FormData();
formData.append('file',files);
Is this the right approach if we need to send files as form-data to server ? If not please guide me the correct approach or format to append ... Even tried appending as an Array but no luck 😐 As the server side shown up few errors :
* Not a multi-part request
* Required request part 'file' is not present
If not as form-data and the same when i used `fileUploader` instead of `uploadCollection` and server side as `Python` * `fileUploader` has an attribute called `name` which can be used for rendering in server side as :
`uploaded_files = request.files.getlist("file[]") # flask - python code for ref`
and in UI5 - XML :
<u:FileUploader
id="fileUploader"
name="file" ...
This worked , But whereas when using `UploadCollection` it didn't as it has no such attribute and
what to consider on server side to fetch the same as `file[]` ?
Does it has any `name` attribute ?
I have gone through ui5 doc for ref but i couldn't find any attribute `name` Hope the Q is clear , any help is much appreciated .. Thanks
Request clarification before answering.
User | Count |
---|---|
76 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.