Use background jobs to transfer folders
Nextcloud allows to mount a lot of storage types (filesystem, S3, FTP, Federated Share, SMB, WebDAV, etc…). When a folder is transferred from such a storage to a different one, transferring the folder means copying the data from one storage to another, which can take a lot of time and will end up in a timeout if it's done during a single request.
In this case, it would be much better to perform the transfer during a background job, just as the original feature in the files app currently does, with TransferOwnershipEntity
and the TransferOwnership
background job.