File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with the File upload

 
ramanuja varun
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem using the fileupload/browse button. When i am retrieving the field in the spring framework controller it is supposed to render the full path instead it is rendering only the file name which has been uploaded.Can somebody help me out with this. In short i want the full path of the file to be displayed.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not change that. Browsers have done that for "Security" reasons.

Eric
 
ramanuja varun
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir can you let me know is there any way to store the file location. My requirement is to store the location which i have to use to retrieve when ever my file is updated.Please let me know ASAP.
 
Jay Abrahm
Ranch Hand
Posts: 183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if I understood the requirement right but how about either storing the location path of the file in the database. I have seen projects doing this but even better if all the files are stored in the same location have it in a properties file
 
ramanuja varun
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes sir i have to take the location of the file from the administrator of the site, store it in the database and retrieve when ever any updates are made. That is if the logo has been changed the admin will just give the location of the new logo. The logo will be updated automatically.
 
Jay Abrahm
Ranch Hand
Posts: 183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alright, let me try to understand this right. You have a field in the Spring Controller which picks up values from the DB where you have the right path stored.

Are you saying that the db retrieval is not proper or is the field picking up values from some other source.
 
ramanuja varun
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Form wherein the admin will enter the location of the logo(image) to be screened using the fileupload/browse .I have to take this real path and store it in the database and retrieve it for later use.I am using spring framework.
[ December 15, 2008: Message edited by: ramanuja varun ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you are not going to get the path with HTML's file upload control. Look into an applet and see if you can get the path that way.

Eric
 
bob david
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friend,
You can try applet to upload the file.By browsing the html files available in the applet.


-----------------------------------------------
Big File Upload
" Have a unique feature, like salt. Its presence is not felt but its absence makes things tasteless/useless!"
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic