I have a standard format for my filename which is
user1_name_date
for example:
user1_greedy_09202009
Thus when the user browse for a file with a different filename format it will display an error "Invalid filename format". Any idea on how can this be done. Thanks
how to filter filename in file upload
Moderator: General Moderators
-
greedyisg00d
- Forum Commoner
- Posts: 42
- Joined: Thu Feb 12, 2009 2:48 am
-
amargharat
- Forum Commoner
- Posts: 82
- Joined: Wed Sep 16, 2009 2:43 am
- Location: Mumbai, India
- Contact:
Re: how to filter filename in file upload
you can check file type as follows
Code: Select all
$_FILES["filename"]["type"]-
greedyisg00d
- Forum Commoner
- Posts: 42
- Joined: Thu Feb 12, 2009 2:48 am
Re: how to filter filename in file upload
Thanks but I am referring to the "file name" not the "file extension"