Hi,

I used commons FileUpload [version FileUpload 1.1.1] for file upload
feature in servlet.Using API i am able to get all the required information
except the last modified time stamp of the file in the client side machine.

Code Snippet that i am using::
==============================
                        // Create a factory for disk-based file items
                        DiskFileItemFactory factory = new
DiskFileItemFactory(
                                    yourMaxMemorySize, yourTempDirectory);

                        // Create a new file upload handler
                        ServletFileUpload upload = new
ServletFileUpload(factory);

                        // Parse the request
                        List /* FileItem */items =
upload.parseRequest(request);

                        // Process the uploaded items
                        Iterator iter = items.iterator();
                        while (iter.hasNext()) {
                              FileItem item = (FileItem) iter.next();

                              if (!item.isFormField()) {
                                    clientFileName = item.getName();
                                    sizeInBytes = item.getSize();
                                    ....
                              }
                        }


Example,to expain my requirement:

      Consider a file SampleFile001.txt, Last Modified on the Client
Machine at :-- Tuesday, November 21,            2006, 3:12:11 PM

      Say the file was uploaded/written on to the Server file system using
the Commons API call on                   Wednesday,November 22, 2006,
3:12:11 PM.

      Then at the server side i can only retrieve the Creation TimeStamp of
the file on the server file         system(Wednesday,November 22,
2006,3:12:11 PM), where as i need the Time Stamp when the file was
last modified on the client machine(i.e,Tuesday, November 21,2006, 3:12:11
PM).

Plz suggest me solution

Thanks!


This e-Mail may contain proprietary and confidential information and is sent 
for the intended recipient(s) only.  If by an addressing or transmission error 
this mail has been misdirected to you, you are requested to delete this mail 
immediately. You are also hereby notified that any use, any form of 
reproduction, dissemination, copying, disclosure, modification, distribution 
and/or publication of this e-mail message, contents or its attachment other 
than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polaris.co.in

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to