Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File Upload

 
binu narayanan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Every one,

Iam uploading the file using inbuit tag of html ie <html:file></html:file>. I would like to get the source files actual path details if any one can help me out on this
Thank you
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Actual path" meaning what? The actual path on the *client* side? That's browser-dependent, some browsers only send the file name.
 
binu narayanan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes the client side file path is what iam looking for. The browser main in use for this application is IE
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I remember correctly (which is unlikely, I haven't used Struts 1 for around five years) the FormFile object contains the name; I don't recall if it has the entire contents of the path supplied by the browser (bearing in mind that not all browsers return the complete path; sniffing the request would answer that question).
 
binu narayanan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the help.

I got it fixed through JavaScript and got the full client side path of the file browsed for.
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!