Error » Web Related Error!! » Server Side Languages Error ! » File upload code

Server Side Languages Error ! Post here with questions about PHP, perl/cgi, ASP, etc.

Post New Thread Reply
  File upload code
LinkBack Thread Tools Display Modes
Old 12-Jan-2007, 02:50 AM   #1 (permalink)
Administrator
 
Admin's Avatar

Posts: 876
Join Date: Oct 2005
Rep Power: 10 Admin has disabled reputation

IM:
Default File upload code

I am totally new to html and asp. I have a IIS 6 web server. I need a help to upload 600mb file to directory on my web server. I saw many posts that suggests to use freeaspupload and stuff like that. I have downloaded it but I don't know what to do with it?

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://localhost/

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\tempUploads"

and change the path to:

uploadsDirVar = "C:\inetpub\wwwroot\tempUploads"

Save the changes.

Open http://localhost/freeaspupload/uploadTester.asp in your browser. You should be able to upload a file to your web server.

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.
Admin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
   


   
Old 12-Jan-2007, 09:41 AM   #2 (permalink)
Administrator
 
tijnema's Avatar

Posts: 289
Join Date: Jan 2006
Rep Power: 10 tijnema is on a distinguished road

IM:
Default Re: File upload code

argh, ASP sucks, not OS, and so only working fine on windows, linux has to do it with mono project...., and windows has never been made for servers, so it just sucks....


------------------
2oo7
tijnema is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 27-Feb-2007, 03:20 AM   #3 (permalink)
Fixed Error!
 
AQUARIAN's Avatar

Posts: 803
Join Date: Feb 2007
Rep Power: 2 AQUARIAN is on a distinguished road

IM:
Default Re: File upload code

PHp is much better check

-----
edit.tijnema: no advertising here.

Last edited by tijnema; 07-Mar-2007 at 04:25 AM.
AQUARIAN is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-Mar-2007, 04:24 AM   #4 (permalink)
Administrator
 
tijnema's Avatar

Posts: 289
Join Date: Jan 2006
Rep Power: 10 tijnema is on a distinguished road

IM:
Default Re: File upload code

yeah that's what i mean, but we are not going to advertise here...


------------------
2oo7
tijnema is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Post New Thread Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -8. The time now is 12:30 PM.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

DMCA Policy

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228