Hello
I have a process with an overview. In the overview, I download a document via an HTTP link
"/bonita/API/"+ contextbdm.grandparent_ref.url
On the portal, I can access a case. From the case, I access the overview; then, I upload the document. Url is
http://localhost:9080/bonita/API/documentDownload?fileName=aDoc%201.pdf&contentStorageId=12
HTTP code= 200 / I received the content.
Via the Explorer page (https://community.bonitasoft.com/project/page-explorer-seach-cases-multiple-criteria-multiple-origin), I do the same manipulation.
I access the Overview on the same case, and I click on the same URL and...
URL to upload is
http://localhost:9080/bonita/API/documentDownload?fileName=aDoc%201.pdf&contentStorageId=12
HTTP code is 200, BUT there is not document uploaded. I have the feeling Bonita Portal says "200" but sends an empty document.
HAR is here:
https://www.dropbox.com/s/re7sw27ywfjhph2/CaseOverviewActifBingHtml.har?dl=0
So, I suspected a CORS or anything like this.
I analyze the portal structure: Portal do a
<iframe onload="setFocusOnIframe()" id="bonitaframe" src="resource/processInstance/GrandParent/1.0/content/?id=7&locale=en"></iframe>
when explorer does:
<iframe src="/bonita/portal/resource/processInstance/GrandParent/1.0/content/?id=7" width="100%" height="100%"
style="border: none; height: 806px;" title="Case overview" id="icaseoverview"
onload="onLoadIFrame()"
sandbox="allow-same-origin allow-scripts allow-popups allow-forms"></iframe>
So, seem the be the same isn't ? Difference is the parent of the Iframe : for the Bonita Portal, it's /bonita/portal, for the custom page, /bonita/portal/custom-page/custompage_explorer/?
Last but not least, if I copy the documentDownload directly from the browser, it's working.
So, any idea on what's its blocking? Is the Bonita portal who send an empty document?