• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need fetch fullpath of a file uploaded

 
Jiya Khan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want full path of the image uploaded through struts file upload.

AbcForm frm= (AbcForm)form;

FormFile image1 = galform.getTheFile1();

image1 is giving only filename. but i want full path of that file like "C:\temp\DSC00263.JPG";

could anybody please tel how can i do it..

Regards,
jiya
 
shirish katti
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using java it is very easy..

You can get the path of a file as below

File f=new File("fileName");
system.out.println(f.getAbsolutePath());
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic