Forums

ASP

This topic is locked

Capturing Image size in ASPUpload

Posted 04 Jul 2002 12:25:52
1
has voted
04 Jul 2002 12:25:52 euan green posted:
Hi,

How do you capture the size of the image that is uploaded using ASPUpload 2.09?

I can get the dimensions ok, and I know you can specify the maximum inage size allowed (3MB for example) but I would like to capture the image size and store it in the database, or create it using the FSO by reading the image size when the page is generated, whichever way is easiest <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>

TIA

Euan

Replies

Replied 04 Jul 2002 13:07:31
04 Jul 2002 13:07:31 euan green replied:
[GOT IT]
Managed to figure it out, not bothering capturing the info when uploading, but displaying it at runtime using:

Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject"
Set objFile = objFSO.GetFile(Server.MapPath("../uploaded/photolibrary/" + (rsPhotoLibrary.Fields.Item("plImageName".Value)))
intFileSize = (objFile.Size)/1000


Euan




Reply to this topic