N
Nabanit Barooah
Hi,
We are working on a Web Application (in ASP.NET). The application basically
deals with uploads from the client machine. We need to check the size of the
file that will be uploaded. The size must be known in the client - side of
the application, so that proper validations can be done before the user tries
to upload the file.
One way of resolving this issue is by using File System Object in JavaScript
or using Create Object in VBScript. But this has got some security issues -
we need to enable an Internet Option "Initialise and Script ActiveX object
not marked as safe". We are looking for any other alternative approach. It
will be very helpful if anyone can suggest some solutions.
Code we are using in JavaScript:
var objFSO, objFile, fileSize;
objFSO = new ActiveXObject("Scripting.FileSystemObject");
objFile = objFSO.GetFile(document.all.item("File1").value);
fileSize = objFile.Size;
Regards,
Nabanit Chandra Barooah
We are working on a Web Application (in ASP.NET). The application basically
deals with uploads from the client machine. We need to check the size of the
file that will be uploaded. The size must be known in the client - side of
the application, so that proper validations can be done before the user tries
to upload the file.
One way of resolving this issue is by using File System Object in JavaScript
or using Create Object in VBScript. But this has got some security issues -
we need to enable an Internet Option "Initialise and Script ActiveX object
not marked as safe". We are looking for any other alternative approach. It
will be very helpful if anyone can suggest some solutions.
Code we are using in JavaScript:
var objFSO, objFile, fileSize;
objFSO = new ActiveXObject("Scripting.FileSystemObject");
objFile = objFSO.GetFile(document.all.item("File1").value);
fileSize = objFile.Size;
Regards,
Nabanit Chandra Barooah