I'm trying to add a file upload control to aspx page on my site, I've dragged the control onto the page and added a submit button beside it, the code for the button was this;
I done it in asp.net with vb script
FileUpload1.Sav eAs("C:\Documen ts and Settings\User\D esktop\New Folder" & FileUpload1.Fil eName)
Now that worked fine, I tested the page and after clicking submit the file I specified was then inside this folder. But the I changed the code to this;
FileUpload1.Sav eAs(http://www.mysite.com/test/Uploads/ & FileUpload1.Fil eName)
All I done was changed it so it should save the file to a folder on my server instead of a folder on my computer but it didn't work
It shows following error :
The SaveAs method is configured to require a rooted path, and the path 'http://www.mysite.com/test/Uploads/enter.swf' is not rooted.
How I understand it is I can only use the 'SaveAs' function if the file is to stay on a computer, I can't use it to save the file on a server.
How do I get around this so the files my visitors upload will be saved in the Uploads folder on my server?
I'd really appreciate some help with this as I'm completely stumped.
Kind Regards
Shini
I done it in asp.net with vb script
FileUpload1.Sav eAs("C:\Documen ts and Settings\User\D esktop\New Folder" & FileUpload1.Fil eName)
Now that worked fine, I tested the page and after clicking submit the file I specified was then inside this folder. But the I changed the code to this;
FileUpload1.Sav eAs(http://www.mysite.com/test/Uploads/ & FileUpload1.Fil eName)
All I done was changed it so it should save the file to a folder on my server instead of a folder on my computer but it didn't work
It shows following error :
The SaveAs method is configured to require a rooted path, and the path 'http://www.mysite.com/test/Uploads/enter.swf' is not rooted.
How I understand it is I can only use the 'SaveAs' function if the file is to stay on a computer, I can't use it to save the file on a server.
How do I get around this so the files my visitors upload will be saved in the Uploads folder on my server?
I'd really appreciate some help with this as I'm completely stumped.
Kind Regards
Shini
Comment