Closed beck24 closed 10 years ago
Maybe we should be storing them in the data directory under the plugin project ID instead of the owner ID?
Yes I like that approach much better
Or, to push things further, under the guid of the release entity itself
ok what's the best way to do that using ElggFile? The directory is determined by the owner_guid, but you can't have an entity own itself. I'm mid way through having the release owned by the project and it's working fine, but if there's a better way lets just get to the best way right now
You would have to do it outside the ElggFile API. I'd say just use that API for now since ultimately we don't want to maintain custom code.
Changing the owner of a file should do these file migrations automatically. Same thing has happened for groups.
And in any case, I think Elgg should migrate files to be stored with their entity, not with the entity's owner. Hopefully we'd be able to get that for free if you just use the file API for now...
Old releases aren't downloadable as the files in the old user data directory are not copied/moved to the new owner