• Post Reply Bookmark Topic Watch Topic
  • New Topic

@MultipartConfig in Glassfish 3.1.1

 
Jelo Nehuptra
Ranch Hand
Posts: 36
Java jQuery Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if I didn't specify a location in the @MultipartConfig annotation, how can I access the uploaded file through code?

How can I retrieve the file where Glassfish has put it?

The idea is, the user uploads a .csv file, then the server reads that .csv file.
The problem arises when I didn't use the location method of the @MultipartConfig like:



now, I don't know how to retrieve/search/read the .csv file. I don't know where glassfish has put it and I can't find any API methods to do it. Please help.
 
Jelo Nehuptra
Ranch Hand
Posts: 36
Java jQuery Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got it

 
Christian Ludt
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jelo,

you do not need to know the path to the uploaded file as you can access the file(s) via getParts() / Part#getInputStream().

Best regards
Christian
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!