I want to rename uploaded files with data entered into the forms. File extension should remain the same, but spaces and illegal characters would convert to _.
Any suggestions for starting places with this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm not quite sure I've understood the problem. But you can extends FPFile and override the setValue() method in it so that it updates $this->_destinationFile in the way you need. To convert the names I think you should use regular expressions (see preg_replace(...)) .
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here is question my #2:
I want to rename uploaded files with data entered into the forms. File extension should remain the same, but spaces and illegal characters would convert to _.
Any suggestions for starting places with this?
I'm not quite sure I've understood the problem. But you can extends FPFile and override the setValue() method in it so that it updates $this->_destinationFile in the way you need. To convert the names I think you should use regular expressions (see preg_replace(...)) .
I am trying to change uploaded files with data entered into the forms but not work.
"allowable_content_types" => array('image/gif')
I have change with - jpg, bmp or other file types.
I try with "allowable_content_types" => array('image/gif','image/png','image/bmp')
but not work
Any suggestions for starting places with this?