Forums
This topic is locked
Pure PHP Upload -> can't store filename !!
13 Sep 2004 20:42:02 J H posted:
I'm using Pure PHP Upload version 2.1.2.I want to rename a file to uploaded, then upload the file on the server and store it's name in the database.
According to the tutorial I should use a textfield to set the name of the file to be stored in the database??
This is confusing! I thought it was just the purpose of Pure PHP Upload to retrieve the name to be stored from the file field!
In fact if I try to use the file field to set the name to be stored through my Insert behavior it always returns NULL, giving an error since that column in the database cannot be NULL.
the reason why I don't want to use a separate textfield to set the name is:
1). because then you put an awfull lot of trust to the user to type the filename correctly
2). because I want to rename the file to be uploaded first and store a dynamically build filename, like:
$productREFcode."_".##ext#
Can anyone point me in the right direction (steps to follow?) or know a working tutorial about how to do this?
Replies
Replied 13 Sep 2004 21:27:14
13 Sep 2004 21:27:14 J H replied:
Problems solved. I D/L the latest version of the extension and now everything works. I could even add my own custom file renaming routine, cool!