on 12-15-2008 12:05 PM
Hi Experts,
I have uploaded the image in the server using File Upload UI.Now i has to delete the image from the server.How to do it ?
Regards,
Krishna Balaji T
Hi
I think you can delete the file from server, for that you need to have administrator privilege,
1. get the file directory
2. check if file exists.
3 . delete the file.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try to find the server location like
String FileName ="abc"
String directory =".
temp
webdynpro
web
local
yh1245_ftp"+
"
Components
com.yash.yh1245.Upload
"FileNamewdContext.currentContextElement()
then check it exit or not
boolean sucsss1 = new File(directory).exists();
then
File file = new File(directory"
"wdContext.currentContextElement().getResourceURL().getResourceName().toString());
FilePath = file.getAbsolutePath();
if (file.exists){
file.delete();
}
i hope clear now
thanks
Hi Krishna,
Perhaps, you can not delete this image through the application. If you have administrator privileges, then try to log in and delete it carefully.
Regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To delete the file from the server
File f =new File ("<Path pf the file in server >");
f.delete();
Thanks & Regards,
Lokesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.