on 05-07-2009 10:48 AM
Hello,
I'm trying to download a file from Kpro file server and the name of the file has 2 byte Korean character.
Here is the problem. When I download the file all the Korean letters in the filename is converted to underbar(_).
ex) original filename : 한글파일명abc.xls
downloaded filename : _____abc.xls
And this is the code.
-
lf_value = lf_mimetype.
pf_response->set_header_field( name = 'Content-Type'
value = lf_value ).
pf_response->delete_header_field( 'Cache-Control' ). "#EC NOTEXT
pf_response->delete_header_field( 'Expires' ). "#EC NOTEXT
pf_response->delete_header_field( 'Pragma' ). "#EC NOTEXT
lf_value = lf_filename.
CONCATENATE 'attachment; filename="' lf_filename '"' INTO lf_value.
pf_response->set_header_field( name = 'Content-Disposition'
value = lf_value ).
pf_response->set_data( lf_content ).
pf_navigation->response_complete( ).
-
Please help. Thank you.
Edited by: Ji Yeob Kim on May 7, 2009 1:06 PM
Edited by: Ji Yeob Kim on May 7, 2009 1:06 PM
cancelled
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if you can acces the file from kpro, you have knowledge about the phio? Alright?
So place a call:
object_fileproperty-class = 'DMS_PCD1'.
object_fileproperty-objid = _file-ph_objid.
append object_fileproperty to object_fileproperties.
call function 'SDOK_PHIOS_FILE_PROPERTIES_GET' destination object->remote
tables
object_fileproperties = object_fileproperties
bad_objects = bad_objects.
read table object_fileproperties index 1 into object_fileproperty.
Best regards, Stefan
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 mean that. Sorry, my english is not so good
In the JAVA code below, I want to know how to make 'java.net.URLEncoder.encode(fileNm,"UTF-8")' in BSP.
-
response.reset() ;
response.setHeader("Content-Type", "doesn/matter;");
response.setHeader("Content-Disposition", "attachment;filename=" + java.net.URLEncoder.encode(fileNm,"UTF-8") + ";" );
response.setHeader("Content-Transfer-Encoding", "binary;");
response.setHeader("Content-Length", ""+file.length());
response.setHeader("Pragma", "no-cache;");
response.setHeader("Expires", "-1;");
-
Thank you.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.