Hi, am stuck... again
have a form where a user selects an image on their local drive and then press a button it writes the filename to a database and uploads the image to my server
now the database side is working fine but the image upload part is where i am stuck.
i have an ftp folder on my server that has been setup with permissions and requires a username/password
and im using ADODB.Stream method to upload my files to the server.
can i use this with ftp? i cant see where to put the user/password into my code
if this is not the right option can you suggest an alternative
at the moment i get
line 446 of my code is
my full code for uploading is
have a form where a user selects an image on their local drive and then press a button it writes the filename to a database and uploads the image to my server
now the database side is working fine but the image upload part is where i am stuck.
i have an ftp folder on my server that has been setup with permissions and requires a username/password
and im using ADODB.Stream method to upload my files to the server.
can i use this with ftp? i cant see where to put the user/password into my code
if this is not the right option can you suggest an alternative
at the moment i get
Code:
ADODB.Stream error '800a0bbc'
Write to file failed.
/autobase/bigadedit.asp, line 446
line 446 of my code is
Code:
oStream.SaveToFile (x_adpath & ewUploadFileName(fn_x_smallad) ) , 2
my full code for uploading is
Code:
' Save to File
Set oStream = Server.CreateObject("ADODB.Stream")
oStream.Type = 1 ' 1=adTypeBinary
oStream.open
oStream.Write ConvertToBinary(sTmp)
oStream.SaveToFile (x_adpath & ewUploadFileName(fn_x_smallad) ) , 2 ' 2=adSaveCreateOverwrite
response.Write (x_adpath & ewUploadFileName(fn_x_smallad))
oStream.close
Set oStream = Nothing