JohannIcon
Programmer
Hi all,
I am trying to upload an image on the server, however if the folder does not exist, it is giving me an error obviusly that the folder does not exist. How can I check if it does?
At the moment I am inserting the image as follows:-
var upLoad = Server.CreateObject( 'w3.upload' );
chosenName = String ( upLoad.Form( 'fileName2' ).item );
file = upLoad.Form( 'theFile' );
if ( file.IsFile )
{
file.SavetoFile(Server.MapPath("\\images\\councillors\\"+chosenName));
%>
The file has been saved as <%= chosenName %>.<BR>
<%
}
%>
Thanks for your help
I am trying to upload an image on the server, however if the folder does not exist, it is giving me an error obviusly that the folder does not exist. How can I check if it does?
At the moment I am inserting the image as follows:-
var upLoad = Server.CreateObject( 'w3.upload' );
chosenName = String ( upLoad.Form( 'fileName2' ).item );
file = upLoad.Form( 'theFile' );
if ( file.IsFile )
{
file.SavetoFile(Server.MapPath("\\images\\councillors\\"+chosenName));
%>
The file has been saved as <%= chosenName %>.<BR>
<%
}
%>
Thanks for your help