CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 file upload dynamic

Print topic Send  topic

Author Message
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.
View profile  Send private message
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
View profile  Send private message
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. :-)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.