Author Topic: Copy or move files under extension to a new location during upgrading extension  (Read 2268 times)

Offline yonghan79

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +17/-0
    • View Profile
Hi core devs,

I have a folder that contains uploaded files that was placed under extension folder (extension_name/files), and i want to move the folder and files to a new location (under image folder) during upgrading the extension.

But when i try to upgrade the extension, i found out that the folder is removed.

Is there a way to copy the file and the folder to a new location during the upgrade routine so they are not removed?

Thanks
« Last Edit: December 06, 2023, 11:49:01 AM by yonghan79 »

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Quote
But when i try to upgrade the extension

please clarify how you did this. i mean how you did upgrade of extension.
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline yonghan79

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +17/-0
    • View Profile
i create an upgrade.php file and add it in the config file like this:

Code: [Select]

<upgrade>
  <trigger>upgrade.php</trigger>
</upgrade>

 

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.