You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Bill Comer <bi...@lammtara.com> on 2003/06/30 16:01:21 UTC

FileUpload - deletion of temp files problem

Hi there,
 
I have some servlet code that is correctly uploading two files however
two parameters that are passed to the servlet are also creating temp
files that I am unable to delete until resin restarts. As this will be
infrequent I need to resolve this.
 
I have modified Fileitem.delete() to return a boolean (which incidently
I would have thought to be a good idea anyway...shall I pass this to the
dev forum?)
 
public boolean delete()
    {
        byteStream = null;
        content = null;
        boolean ret = false;
        if (storeLocation != null && storeLocation.exists())
        {
            ret = storeLocation.delete();
        }
        return ret;
    }

& this always returns 'false'.
 
Any clues ?
 
Bill

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003