Dave wrote:
> Is there a way to get file size of an UploadedFile without calling
> getBytes() or writing to a new file using getInputStream()?  A file can
> be large, like 10M.
>  
> An UploadedFile is either on disk or memory, and thus its size is
> available. But the class does not have a method
>    long  uploadedFile.size();
>  

Yes it does:

public interface UploadedFile extends Serializable
{

...


    /**
     * Answer the size of this file.
     * @return long
     */
    long getSize();
}


-- 
Dave Brondsema
Software Developer
Cornerstone University

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to