I have the following code an html form that posts to an asp page see "general" code below:
Add-Item-Form.html
<form method="post" action="Add-Item.asp" enctype="multipart/form-data">
<tr>
<td align="Right" width="380"><P class="Yellow18Bold">ITEM PHOTO(2) </td>
<td align="Left" width="380"><input type="file" name="txtItemPhoto2" size="50" tabindex="6"></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" name="SubmitButton" value="Add" tabindex="7"> <input type="reset" value="Clear" tabindex="8"></td>
</tr>
</form>
Add-Item.asp
(File Uploader Ojbect - called here)
<%For Each File In Uploader.Files.Items%>
<!---Save the file--->
<%Dim ImageFolder%>
<%ImageFolder = "UploadedImages\"%>
<%File.SaveToDisk (ImageFolder)%>
<%strIPName = "UploadedImages\" & File.FileName%>
<!--- will execute stored procedure: add_tblItemPhoto to insert header info into table: tblItemPhoto --->
<!-- #include file="_add-tblItemPhoto.asp" --> <%Next%>
The html code works fine...
The "file uploader object" returns the correct information - (I.E. FileName)
The File.SaveToDisk is not working!!!!!
I get no error message, it's almost like it just doesn't run the command.
It does go to the next line and does the include - which runs a stored procedure to insert the FileName into a table that I later retrieve to display the file that was uploaded.
Why is the File.SaveToDisk not working???? The folder I'm save the file to is at the following location under the inetpub/
The code sits at inetpub/
Am I just using an incorrect path somewhere???? or would there be some sort of permission I'm missing???
Add-Item-Form.html
<form method="post" action="Add-Item.asp" enctype="multipart/form-data">
<tr>
<td align="Right" width="380"><P class="Yellow18Bold">ITEM PHOTO(2) </td>
<td align="Left" width="380"><input type="file" name="txtItemPhoto2" size="50" tabindex="6"></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" name="SubmitButton" value="Add" tabindex="7"> <input type="reset" value="Clear" tabindex="8"></td>
</tr>
</form>
Add-Item.asp
(File Uploader Ojbect - called here)
<%For Each File In Uploader.Files.Items%>
<!---Save the file--->
<%Dim ImageFolder%>
<%ImageFolder = "UploadedImages\"%>
<%File.SaveToDisk (ImageFolder)%>
<%strIPName = "UploadedImages\" & File.FileName%>
<!--- will execute stored procedure: add_tblItemPhoto to insert header info into table: tblItemPhoto --->
<!-- #include file="_add-tblItemPhoto.asp" --> <%Next%>
The html code works fine...
The "file uploader object" returns the correct information - (I.E. FileName)
The File.SaveToDisk is not working!!!!!
I get no error message, it's almost like it just doesn't run the command.
It does go to the next line and does the include - which runs a stored procedure to insert the FileName into a table that I later retrieve to display the file that was uploaded.
Why is the File.SaveToDisk not working???? The folder I'm save the file to is at the following location under the inetpub/
The code sits at inetpub/
Am I just using an incorrect path somewhere???? or would there be some sort of permission I'm missing???