sarah65536
Posts: 13
|
| Posted: 09/06/2007, 3:04 AM |
|
Hi !
I have a big problem with "file upload". The destination directory is static. I wan't it dynamic.
In first, I put a static destination folder to the file upload obect (a temp folder) in the property of the object, and then, I'd like to copy this file from the temp directory to the directory I chose, using PHP.
to do this, I use the function copy, but there is an error message :
"No such file or directory".
After a long, long, long time, I found why there is that error. It' because the file name is :
../326905436.file.txt
the filename had two points ('.'). So for windows, this file does not exist.
I think of 2 possibilities to solve my preoblem :
1 - Rename this file with '_' instead of the first'.'.
In PHP, I try it with the rename function
rename($file src, $filedst);
but, because it needs the name of the source file, it don't fonctioning.
2 - change in codecharge the way it copy the file. because my file named "file.txt" and after upload The file, codecharge put numbers and the point before the old file name :
file.txt --> 09856789987.file.txt
I'd like to know where I can change this, in order to replace, the first '.' by '_'. or, to copy the file without add numbers and point.
please, help me !
PS : I'm french, so, please, be indulgent with my english.
|
 |
 |
jerryvernon
Posts: 35
|
| Posted: 09/09/2007, 9:36 AM |
|
The uploaded file is rename by the classes.php on line 1533.
$ActualFileName = date("YmdHis") . $index . "." . $FileName;
Regards
Jerry
|
 |
 |
sarah65536
Posts: 13
|
| Posted: 09/17/2007, 1:44 AM |
|
thank you very much for your help.
Now, Im sure I will continue my application whithout any problem.
|
 |
 |
|