on 05-26-2008 3:15 PM
Hi, I'm working on ITS to upload/download some files, really simple files in ASC and i use cl_gui_frontend_services=>gui_upload it works fine, and to download the cl_gui_frontend_services=>gui_download that in R/3 works but on the ITS give an error.
Any idea or someone that happend the same?
Thanks in advance to all
Regards
Jaime
Hai ,
u want to upload ur file here is code
<center>File upload test</center>
<br>
<table><tr>
<form method="post" enctype="multipart/form-data" action="http://your_host/servlet/UploadServlet?your_config">
<td> <input type="file" size=20 name="fname"> </td>
<td> <input type="Submit" value="Upload"> </td> </form>
</tr></table>
For download
<%
String myFileName = request.getParameter("fileName");
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment; filename=\"" + myFileName + "\"");
String root = "D:/";
InputStream in = null;
ServletOutputStream outs = response.getOutputStream();
try {
in = new BufferedInputStream
(new FileInputStream(root + myFileName));
int ch;
while ((ch = in.read()) != -1) {
outs.print((char) ch);
}
}
finally {
if (in != null) in.close(); // very important
}
outs.flush();
outs.close();
in.close();
%>
try this u can get it .
Regards ,
venkat .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.