on 12-06-2007 9:37 AM
hi snd expert,
currently i manage to map the filedownload data element with the file that i upload. but then i wish to get the url of the file like
instead of
../../local/UploadEmailPjt/UploadEMail/~wd_key568_1196922994719/testing.pdf?sap-wd-download=1&sap-wd-cltwndid=94299473a3c511dc841300145e5a17d5&sap-wd-appwndid=94299474a3c511dcbd5f00145e5a17d5&sap-wd-norefresh=X
Hi,
If you want to download PDF use this ..
1: create one context attribute of type binary, say srcPdf
2: Insert FileDownLoad UI Element and bind it's data property to "srcPdf"
and write this code in wdDoinit() method
File f=new File(<FileName>);
FileInputStream fis=new FileInputStream(f);
ByteArrayOutputStream bos=new ByteArrayOutputStream();
int length;
byte[] part=new byte[10*1024];
while((length=fis.read(part))!=-1)
{
bos.write(part,0,length);
}
fis.close();
wdContext.currentContextElement().set<srcPdf>(bos.toByteArray());
Regards
LakshmiNarayana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Pl have a look at this blog /people/bertram.ganz/blog/2007/05/25/new-web-dynpro-java-tutorials--uploading-and-downloading-files-in-sap-netweaver-70
Regards
Ayyapparaj
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.