on 08-06-2021 10:33 AM
Hi Experts,
I've taken the fileUploader Complex sample from the documentation, here, and having added an extra Input control in the view, how could I check that the upload was successful and then set the uploaded filename into the added Input control?
I was checking the Controller.controller.js code and the handleCompleteUpload function:
sap.ui.define(['sap/m/MessageToast','sap/ui/core/mvc/Controller'],
function(MessageToast, Controller) {
"use strict";
return Controller.extend("sap.ui.unified.sample.FileUploaderComplex.Controller", {
handleUploadComplete: function(oEvent) {
var sResponse = oEvent.getParameter("response"),
iHttpStatusCode = parseInt(/\d{3}/.exec(sResponse)[0]),
sMessage;
if (sResponse) {
sMessage = iHttpStatusCode === 200 ? sResponse + " (Upload Success)" : sResponse + " (Upload Error)";
MessageToast.show(sMessage);
}
},
and noticed in debugging that the sResponse is undefined;
while checking the doc, it says
has to be put within the "body" tags of the response document of the
iFrame. It can consist of a return code and an optional message. This
does not work in cross-domain scenarios.
is there any alternative method to check a successful upload?
Many thanks for any help about this
With Best Regards,
Flavio
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.