Hi,
I'm writing an updater where a user can upload a file like: jpg/gif/avi.
Now, that's working fine, the only problem is that I need to rename the file, before uploading it.
So: a user selects a file on his computer called 'jamesbond.jpg' on page1.cfm and on page2.cfm I want to rename the file first to e.g. 007.jpg instead of uploading it as 'jamesbond.jpg'.
The problem is not how to rename it, but how can I determine the fileextension?
I do not want to rename a JPG file as a GIF file, so the script needs to know the source file is a JPG OR a GIF file.
Many thanks in advance!
Brma
I'm writing an updater where a user can upload a file like: jpg/gif/avi.
Now, that's working fine, the only problem is that I need to rename the file, before uploading it.
So: a user selects a file on his computer called 'jamesbond.jpg' on page1.cfm and on page2.cfm I want to rename the file first to e.g. 007.jpg instead of uploading it as 'jamesbond.jpg'.
The problem is not how to rename it, but how can I determine the fileextension?
I do not want to rename a JPG file as a GIF file, so the script needs to know the source file is a JPG OR a GIF file.
Many thanks in advance!
Brma