Previous Thread
Next Thread
Print Thread
Hop To
Attachments Question and Problem after Upgrade
#193276 07/29/2007 12:00 PM
Joined: Jul 2007
Posts: 2
NTents Offline OP
stranger
OP Offline
stranger
Joined: Jul 2007
Posts: 2
I just finished the not-so pleasant task of upgrading from version 5.5 to version 7.2 (after upgrading to 6.5.5). I have everything working except for attachments.

I can upload attachments with no problem, and they do get uploaded. However, the files are being renamed with the number instead of being prefixed. For example, instead of help-file.pdf becoming 423-help-file.pdf, it simply becomes 423.pdf. I can't figure out why this is happening.

On a related note, none of my attachments from before the upgrade show up in posts. The word "Attachment" shows up in the posts but there is no link to the files. All my attachments reside in the attachment directory - I just can't figure out why the links to them in the posts are gone.

Any help would be appreciated, as I'm at a loss.

Re: Attachments Question and Problem after Upgrade
NTents #193294 07/29/2007 5:45 PM
Joined: Jun 2006
Posts: 9,243
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
To cut down on problems with certain characters creating issues, all file names are just set to the actual file id. This makes it so the file upload will work on any system no matter the character set being used.

As for your old attachments. That I'm not too sure on, it sounds like possibly an upgrade issue where the actual file attachments aren't attached to a post. If you're familiar with mysql, you can take a look in the FILES table and look to see if all of the fields are populated on some of the old imported POST_IDs.

Re: Attachments Question and Problem after Upgrade
Rick #193298 07/29/2007 6:07 PM
Joined: Jul 2007
Posts: 2
NTents Offline OP
stranger
OP Offline
stranger
Joined: Jul 2007
Posts: 2
Thanks for the help. After looking at the FILES table, there were a couple of fields not populated. The one that matters, apparently, is the FILE_ORIGINAL_NAME field, because as soon as I add that value, the attachments show up in the post.

Thanks again.

Re: Attachments Question and Problem after Upgrade
NTents #193315 07/29/2007 7:58 PM
Joined: Jun 2006
Posts: 15,938
Likes: 27
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,938
Likes: 27
If it's just a problem of FILE_ORIGINAL_NAME not being populated, you can execute this query to populate it with what is in FILE_NAME:
Code
update ubbt_FILES set FILE_ORIGINAL_NAME = FILE_NAME


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, I Find Rocks, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: Attachments Question and Problem after Upgrade
NTents #193334 07/29/2007 10:36 PM
Joined: Jun 2006
Posts: 9,243
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
Thanks for the followup. Looks like I need to make an adjustment to the importers.

Re: Attachments Question and Problem after Upgrade
NTents #200222 10/30/2007 2:59 AM
Joined: Jun 2006
Posts: 34
newbie
Offline
newbie
Joined: Jun 2006
Posts: 34
Originally Posted by NTents
I can upload attachments with no problem, and they do get uploaded. However, the files are being renamed with the number instead of being prefixed. For example, instead of help-file.pdf becoming 423-help-file.pdf, it simply becomes 423.pdf. I can't figure out why this is happening.

OK, I understand why this was done (as to Ricks answer) but I would really like to have the old behavior back, i.e. that the file is saved with the original name (plus the attachment number).
Would it be possible to make a selection for the admin to select between the two behaviors?

The reason to why I would like to have the the file saved with the original name is that I don't want to rename the file back to the original name when I download it.


One more thing that is different is that previously when an attachment was added, the attachment number was listed in the post, but nowdays it is not. I would like this back also...

... but this starts out to be a little of a wish list - perhaps I need to post this in the suggestion forum?


Link Copied to Clipboard
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
[NOTABUG] Report Post bug..
by Morgan - 07/05/2020 1:48 PM
Trial Subscription question.
by Ruben - 07/03/2020 2:34 PM
Unread posts no longer tracked per user...
by KirkW - 06/16/2020 12:21 AM
Max Image file size upload
by jjjjj - 06/10/2020 10:25 PM
Error on Inert into POSTS
by jjjjj - 06/07/2020 8:09 PM
Who's Online Now
0 members (), 98 guests, and 42 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4