Questions & Answers 11 years 5 months ago #1

  • Erik F
  • Project Manager
  • Bukarest, Rumänien
  • Localtime: 11:32
  • Europe/Bucharest
  • Posts: 5075
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.