-
Bug
-
Resolution: Fixed
-
Normal
-
9.6.0
-
Security Level: Jimmy
Steps to Reproduce
Run a upload / download in zEmbeded app
Current Result
Upload fails if the embedded application and the outer application are not on the same context due to xhr not sending credentials when uploading, causing AuUploader not to store the media in the session context (since session / desktop is not found)
Expected Result
Upload works in embedded application
Debug Information
Workaround
zk.afterLoad("zk", function () { zk.UploadUtils.ajaxUpload = function (wgt, xhr, formData, sid) { var dt = wgt.desktop, tempUri = zk.ajaxURI('/dropupload', {desktop: dt,au: true}), ajaxUri = tempUri + (tempUri.indexOf('?') == -1 ? '?' : '&') + 'uuid=' + wgt.uuid + '&dtid=' + dt.id + (sid != undefined ? '&sid=' + sid : ''); xhr.open('POST', ajaxUri, true); //providing xhr credentials here, required for session if located in different context xhr.withCredentials = true; xhr.send(formData); } });