This topic is locked

upload vs writetofile

3/20/2007 10:47:28 AM
ASPRunnerPro General questions
H
heets author

I'm still struggling with uploading files greater than 200k. My hosting company has provided a sample upload script that works fine with larger files and my application works fine on the demo server but my application does not work with files larger than 200k on my hosting company's server.
My hosting company is at a loss to explain it. Can I modify the asp code to use upload instead of writetofile to see if that works? Can you help with how to make that change or do you have other suggestions?
The section of code that does the writetofile looks like this:
if avalues.exists("docLocation") then _

strValue = avalues.Item("docLocation")

if not errorhappened and not (vartype(strValue)=11 and strValue=False) then

if isnull(strValue) then strValue=""

ctype = GetRequestForm("typedocLocation")

If ctype = "upload2" Then

' write file

rs("docLocation")= strValue

if strValue<>"" then


WriteToFile Server.MapPath(GetUploadFolder("docLocation","") & strValue), GetRequestForm("file_docLocation")

end if

call report_error

end if
Thanks,

Bruce

Sergey Kornilov admin 3/20/2007

WriteFile function simply transfers file from temporary upload directory to it's permanent location.
There might be some other restriction on the web server that your hosting company is not willing to change.
Theoretically you can change code generated by ASPRunnerPro to use third party upload routine however we do not support this kind of modification.

S
stealthwifi 5/1/2007

I ran into a similar problum when having my users upload movie clips into my DB. I would recomend changing the IIS Settings to a greater value.

Also make sure your database can handle the size and you have enough storage on the server/PC where the site is hosted. I believe a Access DB can hold no more than 1gb total in a table ro teh DB i forget which.
To change the IIS settings go in and modify the Metabase.xml file to the maximum size you would like to uplaod.

http://www.banmanpro.com/support2/File_Upload_limits.asp
Hope this helps

Stealth-