Closed longniao closed 8 years ago
When uploads multipal files, use setName action would rename all files to the same name. so, use the setMultipleNames action with array params will solve the bug.
Example.
// rename the file $fileCount = $file->count(); if($fileCount > 1){ $fileNames = array(); for($i = 0; $i < $fileCount; $i++){ $fileNames[] = uniqid(); } $file->setMultipleNames($fileNames); }else{ $file->setName(uniqid()); }
I agree this is a problem worth fixing, but this isn't my preferred approach to fix it. I'll work on a better solution.
When uploads multipal files, use setName action would rename all files to the same name. so, use the setMultipleNames action with array params will solve the bug.
Example.