Upload Dir Change Loses Old Attachments

Since Opentools.de has now gone away I've created this forum to house FAQs and support for this mod in phpBB2.

Moderator: Experts

Locked
Capmaster
Posts: 6
Joined: Fri May 11, 2007 11:29 am

Upload Dir Change Loses Old Attachments

Post by Capmaster »

I originally had installed Attach mod ver. 2.3.13 and used it for almost 2 years with no major issues. I did hack the code a bit to remove the border around the files in the posts, but that was a minor change. All has been well.

About a week ago I got an error from my server saying the FTP filename list in the files directory was being truncated to 2000 entries. Well, I back up the site files every day and hadn't noticed this before. It turns out I had 4481 files in the dir!

So I set out to update the File Attach mod so it would allow me to rotate directories so as to not overload a single dir. I don't have access to the server settings to change the file limit.

The release notes for ver. 2.4.5 mentioned that you can change the directory and not lose the links of previously attached files in the posts. So I did the upgrade the other day.

Well, it's the same as before - when I change the upload dir in the admin settings, all the previous posts lose their attached files and all that shows is the filename in text.

I repeated the mod on the files I thought were impacted, thinking I might have made a typo the first time. But no luck. Whenever I change the dir, the files are lost.

Did I misinterpret the release notes blurb?

BTW, let me add that I have read a few topics here at your forum, David, and I am truly impressed with the level of help you offer here. Kudos!!!

I don't know if its time management, or what, but trying to get replies from the likes of Acyd Burn or John Abela, or any of the other uber hackmeisters, usually ends up in me muttering curses under my breath and giving up. I guess I don't rate a reply :(

But reading how you helped out Coroner in this topic:
viewtopic.php?t=53

inspired me to register. That help you gave him was truly amazing, and so rare anymore. I know if I have a question here, I can actually get an answer instead of a link to a FAQ page, or a rude reply like is so common on the phpbb.com forum.

Nice work, and here's hoping you don't end up so busy that you can no longer help folks out :wink:
Looking for a few good posters .....
Image
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Post by DavidIQ »

Well I think you might be missinterpreting what changing the directory would do. Changing it will point ALL files to the new directory to which a user might have moved their files to. In this case you wouldn't lose anything. The mod would have to be modified a bit to get the effect you're looking for.
Capmaster
Posts: 6
Joined: Fri May 11, 2007 11:29 am

Post by Capmaster »

DavidIQ wrote:Well I think you might be missinterpreting what changing the directory would do. Changing it will point ALL files to the new directory to which a user might have moved their files to. In this case you wouldn't lose anything. The mod would have to be modified a bit to get the effect you're looking for.
Gotcha.

That's OK because I can prune out the old files using attachment view in the control panel. As long as I keep it under 2000 files I should be OK.

Thanks, David :wink:
Looking for a few good posters .....
Image
Locked