Awesome!.
Mentioned in Elgg Channel on Telegram.
The idea is good, however I see a few issues:
Thanks for the feedback @Jerome, I'm no elgg expert, and the version I had to export was 2.3.17 from what I see.
I also have this mysql query to export files to a local folder, to the export to nextcloud:
```
select concat('mkdir -p ', dest, ' && cp ', orig, ' ', dest) from (
select
concat('"./data/www/',bucket_id, '/',owner_guid,'/',filename,'"') orig,
concat('"./nextcloud/',group_user_name,'/',originalfilename,'"') dest
from (
select ee.owner_guid,
GREATEST(floor(ee.owner_guid / 5000) * 5000,1) bucket_id,
ce.type,
IF(ege.name IS NULL, eue2.username, ege.name) group_user_name,
eue2.username owner_username,
max(case when ems1.string='filename' then ems2.string end)filename,
max(case when ems1.string='originalfilename' then ems2.string end)originalfilename
from elgg_entities ee
join elgg_entities ce on ee.container_guid = ce.guid
join elgg_metadata em on em.entity_guid = ee.guid
join elgg_metastrings ems1 on ems1.id = em.name_id
join elgg_metastrings ems2 on ems2.id = em.value_id
join elgg_users_entity eue2 on eue2.guid = ee.owner_guid
left join elgg_groups_entity ege on ege.guid = ee.container_guid
left join elgg_users_entity eue on eue.guid = ee.container_guid
WHERE ee.subtype = 1 # files
group by ee.guid) as raw)
as orig_dest;
```
I don't know where is the best to put it, but here is better than none :)
Have a nice day everybody :)
Cheers!
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.