• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

to know the contents uploaded by the upload component

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been successfully able to execute the upload component of oreilly and been able to upload components in a desired folder.I want to get the information of the material that has been uploaded so that i am able to save it in the database for future references,Please help
arvind
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do you mean the filename that was uploaded?

it's available as a method on MultipartRequest
 
arvind
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i am using the upload component of oreilly and being successfully able to upload a component to a desired folder.The problem i am facing is that when i upload a particular image/file i want the name of image/file to be inserted in a database so that i can call it later as to when required.for e.g i want to upload test.htm in a particular folder like yogesh. The path of the file will be(..\test.htm). the test.htm is successfully uploaded to a folder but i want the test.htm to be inserted a database say xyz which has a table called test with fields like name,image and so on. I would like to have my test.htm to be inserted in the table test in it's field image.
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"arvind"

Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
------------------

Mahindrakar
IBM Application Server & Developer Forum Moderator

Consultant - Zensar Technologies ,Pune India.
SCJP2, SCJD2 & SCJEA (Part I)
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the code to get the file name..and then u can insert whereever u want..
MultipartRequest multi = new MultipartRequest(request, "/uploadsfile", 1024*1024);
String filename = multi.getParameter("filefield");

Hope this will help u.
 
reply
    Bookmark Topic Watch Topic
  • New Topic