Questions & Answers 7 years 2 months ago #1

  • Erik Folberth
  • Project Manager
  • Bukarest, Rumänien
  • Localtime: 21:36
  • Europe/Bucharest
  • Posts: 4972
Q: The filename of the created pdf-file is <id>.pdf and not <name>.pdf
How can is save them with the name instead of the id?

A: We do not recommend to store the files on the server with the name.
When downloading the file from the component you can save it with name.pdf
It's better to store on with the ID, for several reasons.
Though not recommended, here a tweak if you really want to have the filename like this:

edit [Joomla dir]\administrator\components\com_ebooks\tables\ebook.php and change line 148 from:
return $this->params->get('storagePlace').DS.$this->id.'.pdf';
to:
return $this->params->get('storagePlace').DS.$this->name.'.pdf';
thePHPfactory Team
The topic has been locked.