Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set FormFile

 
Nesrin aboud
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a path on client side to a file,
I can not set it with String representing the path
how to set a FormFile object with this client path to be uploaded?

if it can not be done please help me by another way to upload this file
 
mahesh shinde
Ranch Hand
Posts: 69
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey buddy you need not to set any string representation .
set a bean for that tag you will get file in formfile object

it will give browse button just browse the will and press submit
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Mahesh: wrong version of Struts.

@Nesrin: the server (web app) cannot tell the client (browser) which file to upload. Files *must* be chosen on the client (browser) side.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic