navcan
Posts: 61
|
| Posted: 03/24/2005, 9:42 AM |
|
Hello Peterr and all the community members.
I am using Dundas Upload component with ASP + SQL 2000 and using the latest build of CCS.
File upload component is working fine however I noticed that when the document or image is uploaded to the server, it is renamed to current datetime, a dot and the actual file name e.g. 20053241240150.myimage.jpg
Is it possible to change this format to something else like record_id with datetime, an underscore and the file name. Specially I would like to to remove dot after the date and replace it with "_" (underscore) like 20053241240150_myimage.jpg during the upload process and the field value can also be the same as 20053241240150_myimage.jpg
Any help would be appreciated.
Thank you
navcan
|
 |
 |
Nicole
Posts: 586
|
| Posted: 03/25/2005, 1:47 AM |
|
Hello,
modify the clsFileUpload class (it is stored in the Classes.asp file) code because this functionality is hard coded. Find the following line in the mentioned class-> Function Upload():
NewFileName = GetValidFileName(f.FileName) & f.FileName
This function GetValidFileName(f.FileName) generates the datetime and dot. You can modify this function or provided code line.
_________________
Regards,
Nicole |
 |
 |
|