Skip to Content
1
Apr 04, 2022 at 09:16 AM

Attachment Service - Download attachment issue

1292 Views Last edit Apr 04, 2022 at 12:11 PM 2 rev

Hi everyone!

I'm facing an issue with the Attachment Service (https://help.sap.com/viewer/4c3d1c6b3d744f84aab4c273f979f430/1909.000/en-US/b821e557b83a1070e10000000a44147b.html).

I integrated the Attachment Service reuse component into a freestyle UI5 application and everything worked just fine, but after a few days, when I was presenting it to the customer, the download attachment function wasn't working anymore (other functionality still works, ex. upload). When I click on an attachment (which should start the download), I only get a new blank tab in the browser.

image.png

The console shows following error:

image.png

If I set a breakpoint there, I can see that the URL to which the redirect is being made is empty string (but why?). The batch request that reads the attachments contains the URLs to the data and the data stream ($value), and the application also shows the data about the existing attachments.

image.png

"media_src": "https://<host:port>/sap/opu/odata/sap/CV_ATTACHMENT_SRV/OriginalContentSet(Documenttype='GOS',Documentnumber='EXT47000000000360',Documentpart='',Documentversion='',ApplicationId='005056BB1F371EECAC805FA0031E76C6',FileId='005056BB1F371EECAC805FA0031E96C6')/$value"

If I try opening the URL directly (data or data stream) the request fails.

image.png

What I already analyzed and excluded:

  • no relevant code change in the freestyle UI5 app
  • no change in the backend customizing/implementation
  • no system upgrade (what could have changed the reuse component itself)
  • browser issue (tried with Chrome and Edge, both deliver the same result)

I'm having a hard time understanding what happened and running out of ideas how to try to fix the issue. Any ideas would be appreciated!

Attachments

image.png (100.9 kB)
image.png (27.7 kB)
image.png (87.3 kB)
image.png (16.0 kB)