Upload image in non web accessible folder
Posted on 2004-03-30
We are developing a website where we enable users to upload images on our server. Right now I am storing the image in our database, without having an actual copy of it on our server. However, for creating the proofs, the customer needs the actual jpg/gif files.
The web hosting company only has ASP SimpleUpload installed, and they don't allow anonymous uploads to the server. They did mention that we could use a non web accessible folder, upload our images there, and later on move that image to the desired folder.
I just wanted to know a little more about what non web accessible folders are, how they provide the security over other folders, and how I can use them in my situation.
Would this code work to upload the file to the folder?
For Each File In MyUploader.Files.Items
File.SaveToDisk Server.Mappath("../uploadimage") 'to store image in uploadimage folder
And then to move the file, I could use
set fso = Server.CreateObject("Scripting.FileSystemObject")
fso.MoveFile "C:\source.txt", "C:\anotherfolder\source.txt"
Set fso = Nothing
Do I really need to use ASP Simple Upload, aor do I need to ask for other components?
Thanks in advance