anno1337
anno1337

Reputation: 127

Change upload path for Typo3 extension

I'm creating a Typo3 extension which is designed to replace another one that is no longer maintained and highly insecure. The new extension uses the old sql schema and works well so far. However, old entries have their images died in

uploads/tx_oldext

The new one now obviously wants to use it's own subdirectory of uploads. I don't want that and am looking for a way to make the new extension use the old upload directory instead. How can this be achieved?

Upvotes: 0

Views: 1481

Answers (1)

lorenz
lorenz

Reputation: 4558

You cannot change the upload folder globally for an extension. Your extension can either generate a new upload folder in its own namespace or not create one, see more on "uploadfolder" in https://docs.typo3.org/typo3cms/CoreApiReference/ExtensionArchitecture/DeclarationFile/Index.html

But, if you want to change the upload folder for a field in your TCA, you can do that. Just define an "uploadfolder" in the field definition for a group field:

'uploadfolder' => 'uploads/tx_myoldext'

Upvotes: 2

Related Questions