function getFileSize(filePath){ var image=new Image(); image.dynsrc=filePath; alert(image.fileSize); }