1

I am developing a custom module. In this regard I have to upload image in admin panel. I found below codes in some tutorial.

$uploader->setAllowRenameFiles(true);
$uploader->setFilesDispersion(false);
$uploader->setAllowCreateFolders(true); 

I would like to know more about these lines. What do they mean ??

1
  • $uploader->setAllowRenameFiles(true); //if true, uploaded file's name will be changed, if file with the same name already exists directory. Necessary to avoid conflicts

  • $uploader->setFilesDispersion(false); //To have a dispersion based on the original file name (as the file option does), we will have to do it manually

  • $uploader->setAllowCreateFolders(true); //for creating the directory if not exists

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.