![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Server Side Languages Error ! Post here with questions about PHP, perl/cgi, ASP, etc. |
![]() |
|
File upload code
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Administrator
Posts: 876
Join Date: Oct 2005
Rep Power: 10
IM:
|
Again I am a total moron when it comes to web development. Solution: Let's say your default website id C:\Inetpub\wwwroot, and you access from a browser with http: Add two subdirectories, one called freeaspupload, and the other called tempUploads. You can do that from the web server using Windows Explorer. Copy the two files ("freeASPupload.asp and uploadTester.asp") into the freeaspupload folder. Using Windows Explorer, right click on the tempUploads folder and select properties. Select the advanced tab and scroll down the list of users until you find the Internet Guest Account. Click that account then in the permissions box below, add (check) the Read permission and check the Write permission. Edit the uploadTester.asp page in Notepad. Find the line: uploadsDirVar = "d:\inetpub\webmailasp\database\tempUplo and change the path to: uploadsDirVar = "C:\inetpub\wwwroot\tempUploads" Save the changes. Open http: The only thing tricky is setting the permissions on the upload folder, and changing the upload path variable in the provided test page. You cna use the example code in the test page to make your own custom form. Normally, you would not put a upload folder in the webroot or in any folder withing the webroot. On my test server the path to the default website is on the D drive, and I added a separate folder for tempUploads, so it will not be under the webroot. I used the paths above for the sake of telling you what to do to make it work, to make it work more securly put the uploads directory outside of the webroot so no one can browse or execute the uploaded files from their browser. |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Administrator
Posts: 289
Join Date: Jan 2006
Rep Power: 10
IM:
|
------------------ 2oo7 |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|