on 01-25-2016 3:14 PM
Hi everyone,
I'm working on SRM new UI add-on shopping cart.
I'm uploading .pdf and .doc file with file upload control.
I can download .doc file directly. But I can't download .pdf file directly.
When I push pdf file open a new tab. I want to download file directly.
How can I solve this problem?
Best regards
Burak Oral.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also I wrote file path to my browser with manual, It opens again display mode.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This should be set through header request from the browser to the server and back, but assuming you won't have control of server-side configuration, you can try the download attribute for anchor element:
<a href="https://answers.sap.com/path/to/file.pdf" download="file.pdf" target="_blank">Download Button</a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your suggestion but Internet Explorer does not support this attribute.
Burak,
have you tried adding a HTML anchor <a href="<URL_TO_PDF">[Your PDF NAME]</a>
you should be able to open it like that
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I didn't try html a href tag.
I use below code :
template: new sap.ui.commons.Link({text : "{PHIO_FNAME}" , href : "http://myserver:8000/sap/mypdffile.pdf" , target : "_blank"})
I will try thank you Sergio.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.