Home Support Site Search Faq Register Login  
FileUp
empty file upload

Thread Starter: fzhou   Started: 11-02-2006 12:30 AM   Replies: 2
  02 Nov 2006, 12:30 AM
fzhou is not online. Last active: 11/2/2006 12:45:33 AM fzhou

Not Ranked
Joined on 11-02-2006
Posts 2
empty file upload

I am using fileupSE
when user upload file,
if there is no file select ,saFile.isempty = true,
but if file is 0 bytes ,it still isempty,how do I know if user didnt select a file or upload a empty file?


  
  03 Nov 2006, 3:03 PM
Charlie is not online. Last active: 3/8/2007 3:26:59 PM Charlie

Top 10 Posts
Joined on 12-15-2004
Posts 296

SoftArtisans Technical Services

Support team
Re: empty file upload
To check if an uploaded file is zero bytes, you would need to save the file to disk using FileUp and then check the size of the file.  If you're using ASP, I would recommend using FileManager, a component which comes with FileUp.  If using ASP.NET, you can use the FileInfo class built into the .NET Framework.



Charlie Denison
SoftArtisans Technical Services

  
  05 Nov 2006, 7:18 PM
fz is not online. Last active: 3/22/2007 12:05:50 AM fz

Top 10 Posts
Joined on 10-23-2006
Posts 4
Re: empty file upload
thanks for reply.

my problem is when saFile.isempty is true,

there is 2 situation
1. no upload file
2. file is 0 byte

if first situation,when I can saFile.shortname,it will throw exception.
situation 2 will not throw exception.

  
 Page 1 of 1 (3 items)
SoftArtisans Forums » SoftArtisans Products » FileUp » empty file upload