MisterB Posted March 30, 2006 Posted March 30, 2006 Hi Reader ;) I've got I question about a fileupload control. In my webapp. I've got a fileuploadcontol that uploads the file to a folder on the webserver ( eg. C:\Inetpub\wwwroot\UploadedFiles) NOW.... what i want is.. if a file is uploaded it is uploaded to another server ( the server where the webapp runs on is eg myserver so the upload folder is myserver\uploadedfiles and i want it to be stackserver\files ) I would like to do this because the webserver has virtualy no HD space and the stack server has several TB (:D:0) any idears??? Tnx Mrb Quote
Administrators PlausiblyDamp Posted March 30, 2006 Administrators Posted March 30, 2006 The fileupload control is designed to upload to the webserver hosting the page. You could simply handle the event on the server side and once the file has been uploaded move it to the correct place. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
MisterB Posted March 31, 2006 Author Posted March 31, 2006 Do you know how I can do that? ( because i don't :() Tnx Mrb Quote
MisterB Posted April 4, 2006 Author Posted April 4, 2006 Found it :) here is the code '-- Moving a file Dim fs, f fs = Server.CreateObject("Scripting.FileSystemObject") f = fs.GetFile("c:\test.txt") f.Move("\\Myserver\Uploads\test.txt") f = Nothing fs = Nothing '-- Moving a folder Dim fs, fo fs = Server.CreateObject("Scripting.FileSystemObject") fo = fs.GetFolder("c:\test") fo.Move("c:\asp\test") fo = Nothing fs = Nothing Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.