Hi
I was wondering if anyone knew if it was possible to upload an image to two different locations on file upload at the same time?
Using : editor.ImageGalleryPath = ""
Many thanks for any help on this.
You can make changes to filepost.asp to achieve this.
In the line 104 of the filepost.asp, you will find the following code:
' If your upload path is different, set that here
filePath = ImageGalleryPath &"/"& fName
savePath = server.mapPath( filePath)
saveFile.write( myRequestFiles(0, 1))
saveFile.close
For example, your another imageagllerypath is "secondgallerypath", you can implement the following code:
secondsavePath = server.mapPath( secondgallerypath)
set secondsaveFile = lf.createtextfile(secondsavePath, true)
secondsaveFile .write( myRequestFiles(0, 1))
secondsaveFile .close
let me know if you have any further question.
asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx Web Messenger: http://cutesoft.net/Web-Messenger/default.aspxasp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspxasp wysiwyg html editor: http://cutesoft.net/ASP asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx Live Support: http://cutesoft.net/live-support/default.aspx
Hsq,
No, I don't think you can upload the files to two diffent servers at the same time.
I suggest you use the FTP to send the files to the other server. Below is the code I used before to FTP the files in the fly.
<%
Public
StrHost = "xx.xx.xx.xx"
StrUser = ""
StrPass = ""
StrMode = "ascii"
LocalDir = ""
RemoteDir = ""
file_tobe_FTP = server.MapPath(file_tobe_FTP)
strFile = objFSO.GetTempName
strFile = objTempFldr & strFile &".ftp"
objFSO.CreateTextFile(strFile)
objFile.WriteLine(StrUser)
objFile.WriteLine(StrPass)
objFile.WriteLine("lcd "& LocalDir)
objFile.WriteLine("cd "& RemoteDir)
objFile.WriteLine StrMode
objFile.WriteLine("put "&file_tobe_FTP)
objFile.WriteLine("bye")
objFile.close
strErrorLog = objTempFldr.Path & "ftpErrors.txt"
strLog = objTempFldr.Path & "ftpLog.txt"
objFile.Write( ReturnCode.ReadAll() )
objFile.Write( Output.ReadAll() )
objFile.Close()
objFSO.DeleteFile strFile,
End
%>