CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 Rename file upload

Print topic Send  topic

Author Message
jichz84

Posts: 4
Posted: 07/30/2008, 2:00 PM

Hello, i need some code to change the name of my uploaded file.
I use the control file upload provided by codecharge
but my file is saved in my database with the name "20080730024136.3.jpg"
i need that file file have the following name "foto/20080730024136.3.jpg"

it's very importan i have to do this form my work... :(
_________________
jichz
View profile  Send private message
jope

Posts: 3
Posted: 08/04/2008, 4:34 AM

hi :)

you can change the filename in classes.php, but why need you foto/ in your filename??


View profile  Send private message
jichz84

Posts: 4
Posted: 08/04/2008, 12:29 PM

I have a field called photo into my database; when I upload an image named "jorge.jpg" the filename is changed to "20080731050341.jorge.jpg" and that is the name that is saved into my field.
The problem is that I want to save the field with my own format "foto/originalfilename" because "foto" is the path in with my photos are uploaded.
I hope anyone can help me...

_________________
jichz
View profile  Send private message
ramsenthil18

Posts: 1
Posted: 09/22/2008, 10:36 PM

<%
File f1=new File("C:\\AA\\Sen.flv");
File f2=new File("C:\\SS");
f1.renameTo(new File("rename.flv"));
File f3=new File("rename.flv");
boolean result=f3.renameTo(new File(f2,f3.getName()));
if(result)
response.sendRedirect("http://www.smslife.in");
else
response.sendRedirect("http://www.google.in");
%>
View profile  Send private message
cetan2

Posts: 7
Posted: 03/25/2009, 9:32 PM

CCS will change the file name to [ capture datetime + original file name ] in the attachment name.
Is there a way to configure not to include the capture datetime in the attachment ?
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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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