on 11-10-2017 7:42 AM
Hello All
We have a custom App, where in a Link has been given thru which the user can open the document (pdf/doc) in a separate browser window. The document is coming from oData service as binary string. The URL is calculated using the following
/Service/EntitySet(key)/$value
The URL works fine in Desktops. However it does not work in Mobile devices . When the user clicks on the links, a download starts, after that the document does not open. Here are some screen shots
Thanks
Sandip
Hi Sandeep,
Add below code snippet in your GET_STREAM.
*---Set File Name for the file to be downloded
ls_lheader-name = 'Content-Disposition'.
concatenate 'outline; filename=' ls_zzupld-filename INTO ls_lheader-value.
set_header( is_header = ls_lheader ).
CLEAR ls_lheader.
*---Set Content Type in header
ls_stream-mime_type = ls_zzupld-mimetype.
ls_stream-value = ls_zzupld-value.
copy_data_to_ref(
EXPORTING
is_data = ls_stream CHANGING
cr_data = er_stream ).
Please mark as answered if this is helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.