brandonsavage / Upload

File uploads with validation and storage strategies
MIT License
1.67k stars 315 forks source link

there is no $file->setName($new_filename); method in new version? #80

Open shokri-navid opened 8 years ago

shokri-navid commented 8 years ago

i cannot find setName method in my file class ??? its my code : $storage = new Upload\Storage\FileSystem(AppSetting::UploadDirectory()) ; $upload = new Upload\File("uploader",$storage);

wimverstuyf commented 8 years ago

'File' can contain multiple files, so you first need to loop over it.

foreach($upload as $file) {
  $file->setName("new_filename");
};
williamespindola commented 8 years ago

@navid-dada you solved your problem with @wimverstuyf's answer?

josecarlosweb commented 1 year ago

I have the same issue here.