GeorgeS
Posts: 206
|
| Posted: 10/09/2004, 10:21 PM |
|
Hi,
in Upload component properties FIle Folder is set to: pictures
I'm trying to redirect uploaded files into a different folder using BeforeProcessFile event :
MyForm.FileUpload1.FileFolder = Server.MapPath("./New/")
but for some reason files are uploaded into the root directory (one level above 'New' folder) with the names started with 'new'
like: New20041092157240.photo_23.jpg
I have tried Server.MapPath("New/") - same result
I'm using Persits asp upload component.
Any suggestions?
_________________
GeorgeS |
 |
 |
GeorgeS
Posts: 206
|
| Posted: 10/09/2004, 11:27 PM |
|
Figured out that if "\" is added to the path files are uploaded to the correct folder.
MyForm.FileUpload1.FileFolder = Server.MapPath("./New/") & "\"
In CCS help there is no & "\"
=================================
If UCase(Right(Form1.FileUpload1.Value, 4)) = ".JPG" Then
Form1.FileUpload1.FileFolder = Server.MapPath("./images/")
Else
Form1.FileUpload1.FileFolder = Server.MapPath("./uploads/")
End If
what is wrong?
_________________
GeorgeS |
 |
 |
GaryDN
Posts: 34
|
| Posted: 10/23/2004, 10:12 AM |
|
Thanks George, I thought I was crazy for a while!
|
 |
 |
GeorgeS
Posts: 206
|
| Posted: 10/23/2004, 2:05 PM |
|
Gary,
I'm glad that I'm not alone anymore... though that everybody else had no problems with Upload component & I was doing something stupid.
Take care..
_________________
GeorgeS |
 |
 |
|