• 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic