I use the following bit of code to only get the filename:

fileName = item.getName();            
            fileFieldName = item.getFieldName();              
            
            StringTokenizer tokenizer = new StringTokenizer(fileName, "\\,
:, /");            
            int amount = tokenizer.countTokens();             
            for (int i = 0; i < amount -1; i++) {
                tokenizer.nextToken();        
            }               
            String currentFile = tokenizer.nextToken();

Kind Regards
Schalk Neethling
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
 

:: -----Original Message-----
:: From: Jan Agermose [mailto:[EMAIL PROTECTED]
:: Sent: Friday, August 29, 2003 4:49 PM
:: To: Jakarta Commons Users List
:: Subject: Re: Uploading 30Mb files
:: 
:: How do I get the original filename of the file uploaded?
:: 
:: Jan
:: 
:: ----- Original Message -----
:: From: "Jan Agermose" <[EMAIL PROTECTED]>
:: To: <[EMAIL PROTECTED]>
:: Sent: Thursday, August 28, 2003 11:16 PM
:: Subject: Uploading 30Mb files
:: 
:: 
:: > I'm developing an webapplication that handles big files 20-40 Mb per
file.
:: Up until now the upload of the files has been done outside the scope of
the
:: application and the application scope has been "limited" to handling
:: indexing document information and locating the documents for user
download.
:: Now I need the admins to upload the documents themselves. But I really
would
:: like it to be a integrated part of the webapplication. Not using ftp and
:: then handling things in the application as usual. But is it possible
using
:: tomcat/commons-fileupload to handle files this size? Will I run into
:: timeouts and size restrictions? I was thinking that an applet might be
:: better, but it is sure simpler to use std. html upload if no restrictions
:: apply?
:: >
:: > Jan Agermose
:: >
:: 
:: 
:: ---------------------------------------------------------------------
:: To unsubscribe, e-mail: [EMAIL PROTECTED]
:: For additional commands, e-mail: [EMAIL PROTECTED]



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

Reply via email to