I\'m using the Blueimp jQuery file upload tool. I\'d like to completely rename the files as they\'re uploaded. Since photos are being added to a unique directory based on the us
Thanks for that !
But I got a problem, I would like to rename with a field title, I've try to use that :
protected function handle_form_data($file, $index) {
$file->title = @$_REQUEST['title'][$index];
}
protected function generate_unique_filename($filename = "") {
$extension = "";
if ( $filename != "" )
{
$extension = pathinfo( $filename, PATHINFO_EXTENSION );
if ( $extension != "" ) {
$extension = "." . $extension;
}
}
return $file->title . $extension;
}
But I got a JSON error everytime... (The @$_REQUEST['title'][$index]; work well, I use it for save it in my database)