commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Legeny <jleg...@abmira.sk>
Subject FileUtils: How to get number of uploaded files from the request
Date Mon, 19 Apr 2004 09:04:35 GMT
Hello,
   I would like to get number of uploaded files from the request.
Reason:
   When I use FileUtils I need to set up RepositoryPath before request 
is parsed.
I'm generating unique directory (repository path) where the files will 
be uploaded to.
But when there are no files uploaded but multipart-content is sent, the 
directory is
always cretated and i need to delete it (it is bootless operation).
My question is, if there is possibility to find out number of uploaded 
files before
upload.parseRequest(hsrqRequest) is called. In this case I can skip to 
creating
of RepositoryPath.

Thanks for advice,
Julian

------------------------------- Code example
// there is generated and created unique repository path

String strRepositoryPath = generateRepositoryPath();

// Create a new file upload handler
upload = new DiskFileUpload();

// setting of the repository path

upload.setRepositoryPath(strRepositoryPath);

// Parsing of the request

lstRequestParameters = upload.parseRequest(hsrqRequest);

-------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message