Page 1 of 1

Moving content

Posted: 11 Jan 2025, 07:51
by temabu
How does the content moving function work?  When moving folder, it appears to first copy all the content to the target folder, and then delete the originals.  However if you have a lot of content, this takes forever and if you close your browser session you end up with half the job done and duplicate folders everywhere.

How should I move content?  Cant content simply be a case of updating the paths in the DB?  Why is it copying the content? (if indeed thats is what is happening)

Thanks

Re: Moving content

Posted: 11 Jan 2025, 21:47
by mjau-mjau
Hi Temabu,

I believe I answered in depth by email.
temabu wrote: How does the content moving function work?  When moving folder, it appears to first copy all the content to the target folder, and then delete the originals.  However if you have a lot of content, this takes forever and if you close your browser session you end up with half the job done and duplicate folders everywhere.
Essentially when moving files, we use PHP rename() function, because essentially it's renaming paths. If you are getting bugs, I would need to see this. As noted in my email, if you are moving large amounts of folders with subfolders, you might use Files Gallery instead. It will still be as slow as the process takes on disk, but certainly shouldn't be creating duplicate folders.
temabu wrote:How should I move content?  Cant content simply be a case of updating the paths in the DB?  Why is it copying the content? (if indeed thats is what is happening)
If we managed the files and dirs in the database, they wouldn't have human-readable dirs or file names in the first place. All files would be stored hashed like "8sd07fg8sd7fgsdf98g/a09g8sd0fg9.jpg", and the application would control and manage everything internally. Titles and names would be stored separately in the database. Yes if everything was "virtual" and controlled by the DB, then move would be fast, but you wouldn't be able to do it manually by "updating the paths in DB", because if we used DB, we wouldn't be using paths in the first place.